I am making a group work in openGL, and when i try to open the file that my partner gave me i have this error:
-------------- Build: Debug in CG ---------------
Linking console executable: bin/Debug/CG ld: library not found for -lGL collect2: ld returned 1 exit status Process terminated with status 1 (0 minutes, 0 seconds) 0 errors, 0 warnings
I've seen the same code working in his computer. Is it cause he is working in Windows? and i am working in MacOSX? I am using CodeBlocks IDE.
Can anyone help me solving this?
The OpenGL library is actually a Framework on MacOSX.
It should link correctly if you replace -lGL
by -framework OpenGL
.
Try something like the below, as jweyrich said, OpenGL is a framework in Mac OS X:
gcc -framework OpenGL -framework GLUT -o test test.c
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With