I'm using Microsoft Visual studio 2013. Trying to import DevIL library to load image files i'm getting LNK1104 error: Cannot open file "IL/devil.lib"
My Source.h file which include DevIL libs in Project/Sources directory while the DevIL libs in Project/Sources/IL directory. Here is my code
#ifdef _WIN32
#pragma comment(lib, "IL/devil.lib")
#pragma comment(lib, "IL/ilu.lib")
#pragma comment(lib, "IL/ilut.lib")
#endif
You either have to remove the directory, and use the linker settings to specify the directory;
#pragma comment(lib, "devil.lib")
or you can use a hackish way using __FILE__
:
#pragma comment(lib, __FILE__"\\..\\IL\\devil.lib")
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.