Jump to content
  • Advertisement
Sign in to follow this  
DasBruce

soil linker errors

This topic is 2004 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to load textures with soil and my code is compiling fine but throwing errors when linking.

C:\SourceCode\Libraries\SOIL\lib\libSOIL.a(SOIL.o):SOIL.c|| undefined reference to `glGetString@4'|
C:\SourceCode\Libraries\SOIL\lib\libSOIL.a(SOIL.o):SOIL.c|| undefined reference to `glGetString@4'|
C:\SourceCode\Libraries\SOIL\lib\libSOIL.a(SOIL.o):SOIL.c|| undefined reference to `glGetString@4'|
C:\SourceCode\Libraries\SOIL\lib\libSOIL.a(SOIL.o):SOIL.c|| undefined reference to `glGetString@4'|
C:\SourceCode\Libraries\SOIL\lib\libSOIL.a(SOIL.o):SOIL.c|| undefined reference to `glGetString@4'|
C:\SourceCode\Libraries\SOIL\lib\libSOIL.a(SOIL.o):SOIL.c|| more undefined references to `glGetString@4' follow|
C:\SourceCode\Libraries\SOIL\lib\libSOIL.a(SOIL.o):SOIL.c|| undefined reference to `wglGetProcAddress@4'|
||=== Build finished: 7 errors, 0 warnings ===|


I'm using CodeBlocks 10 with gcc on W7. I tried rebuilding the soil.a but it made no difference. What libraries should I link with to make soil work?

Share this post


Link to post
Share on other sites
Advertisement
Are you linking to -lopengl32 ? Would be nice if you could tell us all the libraries you link to.

Share this post


Link to post
Share on other sites
That seemed really strange to me, as you are linking against all the windows and opengl related libraries, so I tried it in C::B myself and got the same errors.

After struggling with it a while I found the solution: you have to link to SOIL before opengl32!

I didn't know that the order of the libraries matters at all, but that seems to be the proof :) Hope that works for you too!

Share this post


Link to post
Share on other sites
Hi folks,

I am using Code::BLocks, too. But actually I don't have a clue how to link SOIL.
I downloaded SOIL here. But still no clue how to link it.

Would be thankfull for any advice.

Greets

plusnoir

Share this post


Link to post
Share on other sites

After struggling with it a while I found the solution: you have to link to SOIL before opengl32!

 

Very helpful - I would have messed around quite a while before doing this.  Worked for me too.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!