I need to use SOIL lib in my project.
I included the SOIL.h and libSOIL.a directories in my source file (renamed it to libSOIL.lib).
I added the header file to the headers as an existing element and included the header file in another header file that I need.
I also tried: Project Properties> Linker> Input> Additional Dependencies, and then click "<Edit ..>" in the drop-down menu and type libSOIL.lib.
But I get the following errors:
See below (updated errors)
What should I do?
Edit # 1:
This is what I do:
#include "gl/glut.h" #include "SOIL.h"
I have both files in my source directory.
Without code written from SOIL, the assembly succeeds.
With this code:
GLuint grass_texture = SOIL_load_OGL_texture ( "original.bmp", SOIL_LOAD_AUTO, SOIL_CREATE_NEW_ID, SOIL_FLAG_MIPMAPS | SOIL_FLAG_INVERT_Y | SOIL_FLAG_NTSC_SAFE_RGB | SOIL_FLAG_COMPRESS_TO_DXT ); if( 0 == grass_texture ) { printf( "SOIL loading error: '%s'\n", SOIL_last_result() ); }
I get this error:
Error 1 error LNK2019: unresolved external symbol __alloca referenced in the function _stbi_zlib_decode_noheader_buffer working_dir \ libSOIL.lib (stb_image_aug.o) ProjectName
Error 2 of error LNK2019: unresolved external symbol _sqrtf specified in the function _RGBE_to_RGBdivA2 working_dir \ libSOIL.lib (image_helper.o) ProjectName
Error 3 LNK1120 errors: 2 unsolved externals working_dir \ Debug \ ProjectName.exe ProjectName
Chris source share