0

I'm trying to use the SOIL (simple opengl image library) in SDL, at compile time (using CodeBlocks in WindowsXP) is giving the following error 57 times:

G:\mingw32\lib\libSOIL.a (SOIL.o) : SOIL.c || undefined reference to `glTexParameteri @ 12 '|.

I think the problem is in OpenGL, however, the functions that are not finding SOIL, are available and working on my project. I am importing the heading soil.h and put thelibSoil.a along with the SDL libs.

The method that is giving error:

int w, h;
unsigned char* image =
    SOIL_load_image("img.png", &w, &h, 0, SOIL_LOAD_RGB);
vaati
  • 162
  • 2
  • 13
  • You need to link with the OpenGL library as well. Append e.g. `-lGL` to your build command. – Some programmer dude Dec 10 '14 at 14:34
  • linker options: ```-lmingw32 -lSDL2main -lSDL2```, librarys: ```opengl32 glu32 libSOIL``` of my project. – vaati Dec 10 '14 at 14:46
  • Please give the exact command you type to compile your project ? – johnkork Dec 10 '14 at 16:47
  • I use codeblocks, and not by compiler command line. And the links and libraries are the ones i wrote. If even asism be a command line to compile, I'm sorry it did not know. – vaati Dec 10 '14 at 18:01

0 Answers0