pbu
pbu

Reputation: 3060

Issue with compiling Opengl and glut

i am trying to compile a program on my imac, that runs neural network using opengl and glut. i am using framework for mac to compile opengl and glut but still i get this error. i have a feeling that i am missing some library to compile.

Here is the output:

$ gcc gpu.c -o gpu -lfann -lm -framework OpenGL -framework GLUT
Undefined symbols for architecture x86_64:
  "_copyMaskToTexture", referenced from:
      _main in gpu-cb634f.o
  "_copyVectorToTexture", referenced from:
      _main in gpu-cb634f.o
  "_copyWeightsToTexture", referenced from:
      _main in gpu-cb634f.o
  "_destroyLayer", referenced from:
      _main in gpu-cb634f.o
  "_generateLayer", referenced from:
      _main in gpu-cb634f.o
  "_init", referenced from:
      _main in gpu-cb634f.o
  "_initOpenGL", referenced from:
      _main in gpu-cb634f.o
  "_printLayer", referenced from:
      _main in gpu-cb634f.o
  "_run", referenced from:
      _main in gpu-cb634f.o
     (maybe you meant: _run_time)
  "_setInput", referenced from:
      _main in gpu-cb634f.o
  "_setOutput", referenced from:
      _main in gpu-cb634f.o
  "_test", referenced from:
      _main in gpu-cb634f.o
ld: symbol(s) not found for architecture x86_64

Upvotes: 0

Views: 89

Answers (1)

unwind
unwind

Reputation: 400079

I think you're not including the proper code or library.

It looks like your code is related to the FANN library, but the linked page says:

The code is still expremental and is not included in the FANN library but is available for the user to try out if he wishes.

So, your -lfann won't help to get these functions defined, you need something else.

Upvotes: 1

Related Questions