Hello there,
I've got a big problem. I attend to OpenGL courses on my university. On the second lesson our teacher introduced the SOIL library. I have much experience in Linux, so instalation of this lib was quite fast and easy. But, during compilation something with SOIL I get the following error:
1 2 3
/tmp/ccOvwA6M.o: In function `main':
/home/Kist/Dokumenty/programiki/OpenGL/Texture/Texture.cpp:25: undefined reference to `SOIL_load_OGL_texture'
collect2: ld returned 1 exit status
I compile my programs using the following commad: g++ -I/usr/include/X11 -L/usr/lib/X11 -lSOIL -lX11 -lXmu -lglut -lGL -lGLU -Wall -g -o Texture Texture.cpp
Everything else works as it should - Glut, X11... I have really no idea what I do wrong. I tried everythong - such as placing whole SOIL in the project folder. Help me, please, and thank you in advance!
Ok, I found it. I just change the command to:
<code>g++ -I/usr/include/X11 -L/usr/lib/X11 -lX11 -lXmu -lglut -lGL -lGLU -Wall -g -o texture Texture.cpp -lSOIL</code>
I have no idea, why that works, but the point is that it does.