Cannot use SOIL in linux mint

I am doing a task that requires me to use SOIL. I installed it using the sudo apt-get install libsoil-dev , but when I try to compile my program, I get the following error:

 textureMain.cpp:19:18: fatal error: SOIL.h: No such file or directory compilation terminated. textureParams.cpp:17:18: fatal error: SOIL.h: No such file or directory compilation terminated. 

Why can't I compile the program even if I installed SOIL?

+4
source share
2 answers
 $ dpkg -L libsoil-dev |grep include /usr/include /usr/include/SOIL /usr/include/SOIL/SOIL.h /usr/include/SOIL/image_DXT.h /usr/include/SOIL/image_helper.h /usr/include/SOIL/stbi_DDS_aug.h /usr/include/SOIL/stbi_DDS_aug_c.h /usr/include/SOIL/stb_image_aug.h 

So, you probably want the following on the g ++ command line

 -I /usr/include/SOIL 

Or just use the following in your C ++

 #include <SOIL/SOIL.h> 

And you probably need the following on the command line when binding

 -lSOIL 
+9
source

You may need to add the -I compiler argument to tell it where to find the SOIL header files.

+1
source

Source: https://habr.com/ru/post/1480185/


All Articles