User forums > Help
Hard broblems with linking GLEW library
Kolcebruevsky:
Hello C::B forum!
I have a big problem with linking GLEW library. I'm working on Windows 32bit platform, using C::B with GCC. I downloaded GLEW 1.6.0 library binaries from glew.sourceforge.net. When i try compile the project i'm having more linking errors like this "undefined reference ... ".
I'm included this stuff:
Linker settings:
Link libraries:
gdi32
winmm
glew32
opengl32
glu32
Search directories:
Compiler:
D:\glew\include
Linker:
D:\glew\lib
I'm trying use GLEW in static and dynamic mode but problem not solved. I'm read many solutions for this problem but problem not solved... And all GLEW extensions is ignored. So where i can find GLEW library for GCC with all extensions? Please help.
ollydbg:
2.14 Q: How do I troubleshoot an compiler problem?
Kolcebruevsky:
This is log of my errors. How to fix it?
Linker:
libopengl32.a
glut32.lib
glew32.lib
glew32mx.lib
--- Code: ---Build started on: 29-06-2011 at 17:42.04
Build ended on: 29-06-2011 at 17:42.05
-------------- Build: Debug in Test ---------------
Linking console executable: bin\Debug\Test.exe
obj\Debug\Test.o: In function `Z16checkOpenGLErrorv':
G:/Hlp/Glee/Test.cpp:42: undefined reference to `gluErrorString@4'
obj\Debug\Test.o: In function `Z12printInfoLogj':
G:/Hlp/Glee/Test.cpp:59: undefined reference to `_imp____glewGetObjectParameterivARB'
G:/Hlp/Glee/Test.cpp:75: undefined reference to `_imp____glewGetInfoLogARB'
obj\Debug\Test.o: In function `Z10loadShaderjPKc':
G:/Hlp/Glee/Test.cpp:123: undefined reference to `_imp____glewShaderSourceARB'
G:/Hlp/Glee/Test.cpp:127: undefined reference to `_imp____glewCompileShaderARB'
G:/Hlp/Glee/Test.cpp:132: undefined reference to `_imp____glewGetObjectParameterivARB'
obj\Debug\Test.o: In function `Z16setUniformVectorjPKcPKf':
G:/Hlp/Glee/Test.cpp:140: undefined reference to `_imp____glewGetUniformLocationARB'
G:/Hlp/Glee/Test.cpp:145: undefined reference to `_imp____glewUniform4fvARB'
obj\Debug\Test.o: In function `Z7displayv':
G:/Hlp/Glee/Test.cpp:180: undefined reference to `_imp____glewUseProgramObjectARB'
G:/Hlp/Glee/Test.cpp:184: undefined reference to `_imp____glewUseProgramObjectARB'
obj\Debug\Test.o: In function `Z7reshapeii':
G:/Hlp/Glee/Test.cpp:197: undefined reference to `gluPerspective@32'
G:/Hlp/Glee/Test.cpp:200: undefined reference to `gluLookAt@72'
obj\Debug\Test.o: In function `Z7animatev':
G:/Hlp/Glee/Test.cpp:248: undefined reference to `_imp____glewUseProgramObjectARB'
G:/Hlp/Glee/Test.cpp:251: undefined reference to `_imp____glewUseProgramObjectARB'
obj\Debug\Test.o: In function `main':
G:/Hlp/Glee/Test.cpp:284: undefined reference to `_imp____GLEW_ARB_shading_language_100'
G:/Hlp/Glee/Test.cpp:291: undefined reference to `_imp____GLEW_ARB_shader_objects'
G:/Hlp/Glee/Test.cpp:301: undefined reference to `_imp____glewCreateShaderObjectARB'
G:/Hlp/Glee/Test.cpp:302: undefined reference to `_imp____glewCreateShaderObjectARB'
G:/Hlp/Glee/Test.cpp:313: undefined reference to `_imp____glewCreateProgramObjectARB'
G:/Hlp/Glee/Test.cpp:315: undefined reference to `_imp____glewAttachObjectARB'
G:/Hlp/Glee/Test.cpp:316: undefined reference to `_imp____glewAttachObjectARB'
G:/Hlp/Glee/Test.cpp:319: undefined reference to `_imp____glewLinkProgramARB'
G:/Hlp/Glee/Test.cpp:324: undefined reference to `_imp____glewGetObjectParameterivARB'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 1 seconds)
23 errors, 0 warnings
--- End code ---
oBFusCATed:
Hm, have you read the link Ollydbg has given you?
I guess you've not, because this is pretty trivial error you're making...
In the FAQ, you can find other helpful info, please read all the items.
Kolcebruevsky:
Thanks guys. I will trying solve it.
Navigation
[0] Message Index
[#] Next page
Go to full version