I need use SOIL library in my project. My steps:
download and extract zip to my project folder
rename libSOIL.a to SOIL.lib
Properties >> C/C++>General >> Additional include directories - Add "./SOIL/src"
Properties >> Linker >> General >> Additional Library Directories - Add "SOIL.lib"
put #include "SOIL.h"
Function *SOIL_load_image* was found but
error LNK1104: cannot open file 'SOIL.libkernel32.lib'
I know this question is a couple weeks old now, but I figured it can't hurt.
The actual error you are getting is (probably) because you are missing a semicolon in the list of libraries to link.
If you go to Properties -> Linker -> Input -> Additional Dependencies (which I assume you must have gone to, though it isn't in your list of steps), it should say something like SOIL.lib%(AdditionalDependencies).
If you change that to SOIL.lib;%(AdditionalDependencies) (note the semicolon!), then that error should disappear.
What %(AdditionalDependencies) does is append some other libraries that Microsoft knows (or thinks) that you will need. The first of those is kernel.lib, so without a semicolon to seperate your SOIL.lib and kernel.lib, the linker tries to find SOIL.libkernel.lib, which does not exist!!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With