Sign in to follow this  

(solved) Linking errors using Simple OpenGL Image Library (SOIL)

This topic is 3415 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

Hi everybody! Could you help me, please? I'm trying to use SOIL library (http://www.lonesock.net/soil.html) with my SDL-CODEBLOCKS-OPENGL-C++ application. Firstly using codeblocks-static library project I create libSOIL.a, everything works fine. The I add it in my app and I get these errors: -------------- Build: Debug Windows Ventana in Proyecto --------------- Compiling: CManejadorTexturas.cpp Linking console executable: bin\Proyecto_debug.exe librerias\soil/libsoil.a(SOIL.o):SOIL.c:(.text+0x253): undefined reference to `glReadPixels@28' librerias\soil/libsoil.a(SOIL.o):SOIL.c:(.text+0x7e0): undefined reference to `glBindTexture@8' librerias\soil/libsoil.a(SOIL.o):SOIL.c:(.text+0x8d3): undefined reference to `glTexImage2D@36' librerias\soil/libsoil.a(SOIL.o):SOIL.c:(.text+0x9fb): undefined reference to `glTexImage2D@36' librerias\soil/libsoil.a(SOIL.o):SOIL.c:(.text+0xa54): undefined reference to `glDeleteTextures@8' librerias\soil/libsoil.a(SOIL.o):SOIL.c:(.text+0xad7): undefined reference to `glTexParameteri@12' librerias\soil/libsoil.a(SOIL.o):SOIL.c:(.text+0xafa): undefined reference to `glTexParameteri@12' librerias\soil/libsoil.a(SOIL.o):SOIL.c:(.text+0xb27): undefined reference to `glTexParameteri@12' librerias\soil/libsoil.a(SOIL.o):SOIL.c:(.text+0xb4a): undefined reference to `glTexParameteri@12' librerias\soil/libsoil.a(SOIL.o):SOIL.c:(.text+0xb6d): undefined reference to `glTexParameteri@12' librerias\soil/libsoil.a(SOIL.o):SOIL.c:(.text+0xc71): undefined reference to `glGenTextures@8' librerias\soil/libsoil.a(SOIL.o):SOIL.c:(.text+0xcae): undefined reference to `glTexParameteri@12' librerias\soil/libsoil.a(SOIL.o):SOIL.c:(.text+0xcd1): undefined reference to `glTexParameteri@12' librerias\soil/libsoil.a(SOIL.o):SOIL.c:(.text+0xd58): undefined reference to `glTexParameteri@12' librerias\soil/libsoil.a(SOIL.o):SOIL.c:(.text+0x115d): undefined reference to `glBindTexture@8' librerias\soil/libsoil.a(SOIL.o):SOIL.c:(.text+0x135e): undefined reference to `glTexImage2D@36' librerias\soil/libsoil.a(SOIL.o):SOIL.c:(.text+0x1508): undefined reference to `glTexImage2D@36' librerias\soil/libsoil.a(SOIL.o):SOIL.c:(.text+0x1532): undefined reference to `glTexParameteri@12' librerias\soil/libsoil.a(SOIL.o):SOIL.c:(.text+0x1552): undefined reference to `glTexParameteri@12' librerias\soil/libsoil.a(SOIL.o):SOIL.c:(.text+0x1582): undefined reference to `glTexParameteri@12' librerias\soil/libsoil.a(SOIL.o):SOIL.c:(.text+0x1598): undefined reference to `glTexParameteri@12' librerias\soil/libsoil.a(SOIL.o):SOIL.c:(.text+0x15e4): undefined reference to `glTexParameteri@12' librerias\soil/libsoil.a(SOIL.o):SOIL.c:(.text+0x1601): more undefined references to `glTexParameteri@12' follow librerias\soil/libsoil.a(SOIL.o):SOIL.c:(.text+0x168a): undefined reference to `glGenTextures@8' collect2: ld returned 1 exit status Process terminated with status 1 (0 minutes, 2 seconds) 23 errors, 0 warnings First time I saw this I thought maybe I didn't link SOIL library with opengl, so I recompiled soil library adding opengl32 in libraries. It compiled without errors, but it didnt work. I have the same problem. Do you have any idea? Thank you very much for your time. Edit: I solved this addiong soil into my project, instead of using a library. [Edited by - riruilo on May 16, 2008 9:29:21 AM]

Share this post


Link to post
Share on other sites
Solution this problem is showed in the picture.
Let see
mainly reason:
"http://www.romtrans.ovh.org/c/ogl/soil_link_problem.jpg"
if not work try this
"http://www.romtrans.ovh.org/c/ogl/soil_link_error.jpg"

Share this post


Link to post
Share on other sites

This topic is 3415 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.

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