AlexCharlton / Hypergiant

An OpenGL-based game library for CHICKEN Scheme
BSD 2-Clause "Simplified" License
68 stars 5 forks source link

Trying to run the Go example on Mac OS X Sierra #13

Open FredrikMeyer opened 6 years ago

FredrikMeyer commented 6 years ago

Hi, I'm quite new to Chicken Scheme, and was looking over your blog post implementing Go, so I tried compiling it myself.

Installing Hypergiant went fine (there were some warnings during the installation though). But when I try to compile the Go example I get the following output:

[~/code/scheme-sandbox]$ csc go.scm

Warning: excluded identifier doesn't exist in module hyperscene: init
go.c:110:5: warning: implicit declaration of function 'glBindVertexArray' is invalid in C99 [-Wimplicit-function-declaration]
    glBindVertexArray((data->vao));
    ^
1 warning generated.
Undefined symbols for architecture x86_64:
  "_glBindVertexArray", referenced from:
      _fastRenderPhongPipeline in go.o
      _fastRenderArraysPhongPipeline in go.o
      _fastRenderPhongPipelineEnd in go.o
      _renderPhongPipeline in go.o
      _renderArraysPhongPipeline in go.o
      _fastRenderWoodPipeline in go.o
      _fastRenderArraysWoodPipeline in go.o
      ...
  "_glDrawArrays", referenced from:
      _fastRenderArraysPhongPipeline in go.o
      _fastRenderArraysWoodPipeline in go.o
  "_glDrawElements", referenced from:
      _fastRenderPhongPipeline in go.o
      _fastRenderWoodPipeline in go.o
  "_glUniform1fv", referenced from:
      _fastRenderPhongPipeline in go.o
      _fastRenderArraysPhongPipeline in go.o
      _fastRenderWoodPipeline in go.o
      _fastRenderArraysWoodPipeline in go.o
  "_glUniform1iv", referenced from:
      _fastRenderPhongPipeline in go.o
      _fastRenderArraysPhongPipeline in go.o
      _fastRenderWoodPipeline in go.o
      _fastRenderArraysWoodPipeline in go.o
  "_glUniform3fv", referenced from:
      _fastRenderPhongPipeline in go.o
      _fastRenderArraysPhongPipeline in go.o
      _fastRenderWoodPipeline in go.o
      _fastRenderArraysWoodPipeline in go.o
  "_glUniform4fv", referenced from:
      _fastRenderPhongPipeline in go.o
      _fastRenderArraysPhongPipeline in go.o
      _fastRenderWoodPipeline in go.o
      _fastRenderArraysWoodPipeline in go.o
  "_glUniformMatrix4fv", referenced from:
      _fastRenderPhongPipeline in go.o
      _fastRenderArraysPhongPipeline in go.o
      _fastRenderWoodPipeline in go.o
      _fastRenderArraysWoodPipeline in go.o
  "_glUseProgram", referenced from:
      _fastRenderPhongPipelineBegin in go.o
      _renderPhongPipeline in go.o
      _renderArraysPhongPipeline in go.o
      _fastRenderWoodPipelineBegin in go.o
      _renderWoodPipeline in go.o
      _renderArraysWoodPipeline in go.o
      _f_4663 in go.o
      ...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Error: shell command terminated with non-zero exit status 256: 'clang' 'go.o' -o 'go' -m64 -L/usr/local/Cellar/chicken/4.13.0/lib -lchicken -lm

I'm also quite unexperienced reading C error messages. :)

zhaoboqiang commented 5 years ago

brew install glfw3 libepoxy

FredrikMeyer commented 5 years ago

@zhaoboqiang Thank you for the answer. Unfortunally I still get the same message.