SOIL problem

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

And I have no idea why the SOIL functions are missing. There are source codes:
Texture.cpp: http://pastebin.com/Qt0wQYY6
Vertices.h: http://pastebin.com/PRrvKqHC

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!

P.S. Sorry for my english ;) I'm a foreigner.
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.
Topic archived. No new replies allowed.