开发者

Help solving a error in openGL

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 usi开发者_运维技巧ng 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 


Check that you have the actual library, and that -lGL is the correct flag. The name of the library may be different on your system.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜