Question is about Ubuntu. However I was looking for how to get it working in Windows. But in the end is was not so complicated.
Download the soil.zip.
Browse to "Simple OpenGL Image Library\projects\VC9".
Open the SOIL.sln. I have VS15 so I had to upgrade the solution for it. It was automatic without any issues.
Then I build the solution and SOIL.lib was created.
I took this .lib file and put it in my project folder.
Added dependency in my Project - Properties/Linker/Input/Additional Dependencies
Took SOIL.h from "Simple OpenGL Image Library\src and put it in my project folder.
Then I had to include the header file
#include "SOIL.h"
and I can use it for loading image like this:
GLuint tex_2d = SOIL_load_OGL_texture
(
"pic.png",
SOIL_LOAD_AUTO,
SOIL_CREATE_NEW_ID,
SOIL_FLAG_MIPMAPS | SOIL_FLAG_COMPRESS_TO_DXT
);
if (0 == tex_2d)
{
printf("SOIL loading error: '%s'\n", SOIL_last_result());
}