Why do I get an undefined reference( to `glColor3f' ,for example) when I compile a program in c?

血红的双手。 提交于 2019-12-05 13:26:48

Try gcc -o main CG_ex4.c -lGL. The correct order of gcc parameters is important.

Try including GL/gl.h as well as glut. Kind of weird though, since glut actually includes both gl.h and glu.h.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!