Sign in to follow this  
PGSCreativeDirector

glew and code::Blocks 10.5 issue

Recommended Posts

hello am having issues with trying to use glew i have added the linker flags like so


-lmingw32 -lSDLmain -lglew32 -lglew32s -lSDL -lSDL_image -lopengl32



iv included my glew include folder

iv included my glew lib folder

and iv included the glew32s.lib file

iv also done #define GLEW_STATIC

and glewInit

none of which worked

i downloaded from the glew website the binary version is there something wrong with it or am i missing something??

im using code::Blocks 10.5 and mingw :)

it wont compile when i do all those things above in code::Blocks 10.5 :(



heres my compiler errors :(


undefined reference to `_imp____glewCreateShader'|
obj\Debug\main.o||In function `SDL_main':|
undefined reference to `_imp__glewInit'|

please do help :)

Share this post


Link to post
Share on other sites
[quote name='PGSCreativeDirector' timestamp='1318872383' post='4873540']
hello am having issues with trying to use glew i have added the linker flags like so


-lmingw32 -lSDLmain -lglew32 -lglew32s -lSDL -lSDL_image -lopengl32



iv included my glew include folder

iv included my glew lib folder

and iv included the glew32s.lib file

iv also done #define GLEW_STATIC

and glewInit

none of which worked

i downloaded from the glew website the binary version is there something wrong with it or am i missing something??

im using code::Blocks 10.5 and mingw :)

it wont compile when i do all those things above in code::Blocks 10.5 :(



heres my compiler errors :(


undefined reference to `_imp____glewCreateShader'|
obj\Debug\main.o||In function `SDL_main':|
undefined reference to `_imp__glewInit'|

please do help :)
[/quote]
Linker errors I see. With Mingw, the linking order matters. I know from my own projects, GLEW likes to come first or it won't link. Try putting it in front of SDL main. If that doesn't work, move it to the front and try mingw32 in other places. After some experimenting, I can usually find a permutation that works.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this