Undefined reference to `_imp__glewInit@0'

♀尐吖头ヾ 提交于 2019-11-27 06:12:19

问题


I have built the glew lib so many times. My last build removed the undefined references to all the shader functions such as glCreateShader(). I think this build is the correct one cause I found out that Code:Blocks can open Visual Studio 6.0 projects so it had everything laid out for me.

I can compile my app without calling glewInit() but it results in a SEGFAULT right when glCreateShader() is called. Which is caused by not Initializing glew.

I need to turn it on but it wont let me XD

links: mingw32, glew32, opengl32, glu32, glut32

IDE: Code::Blocks

Compiler:MinGW32


回答1:


Save yourself a lot of trouble and just add the glew.c to your project directly. I do not understand why people fight so hard to link to it externally. The license is friendly, and it is only one source file. Just remember to #define GLEW_STATIC.




回答2:


Link glew32 after libs that use it.



来源:https://stackoverflow.com/questions/11710677/undefined-reference-to-imp-glewinit0

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