Original Post
Hi! Since I don't want and can't use the DLL files they give out I'm trying to compile my code with static library versions. I've downloaded the DevIL source code, and compiled the \projects\msvc\static\static.sln. After adding the correct path in the debug build (they weren't using relative paths in debug build, but release works fine). When linking to my project I got several linker errors, it couldn't find some functions. After a bit of fiddling I found out that that these files were missing from the IL project: il_pix.c, il_pxr.c, il_xpm.c When adding them and trying again, I'm still with these errors: DevIL-r.lib(il_pnm.obj) : error LNK2019: unresolved external symbol __pctype referenced in function _ilReadAsciiPpm DevIL-r.lib(il_xpm.obj) : error LNK2019: unresolved external symbol __pctype referenced in function _XpmGetInt DevIL-r.lib(il_pal.obj) : error LNK2001: unresolved external symbol __pctype DevIL-r.lib(il_pnm.obj) : error LNK2019: unresolved external symbol ___mb_cur_max referenced in function _ilReadAsciiPpm DevIL-r.lib(il_xpm.obj) : error LNK2019: unresolved external symbol ___mb_cur_max referenced in function _XpmGetInt DevIL-r.lib(il_pal.obj) : error LNK2019: unresolved external symbol ___mb_cur_max referenced in function _ilLoadHaloPal those files have ONE thing in common, they include after a bit of checking. search for _pctype here or your local ctype.h file (I'm using VS.NET 2003) and if you check XpmGetInt() in il_xpm.c you'll notice that it's using isdigit(). search for isdigit in ctype.h gives you: #define isdigit(_c) ( _pctype[_c] & _DIGIT ) so _pctype is being called inderectly, but doesn't seem to declared according to the linker. there's a #ifndef _CTYPE_DISABLE_MACROS right before the definition of _pctype, but no matter if I #define or #undef before including it doesn't remove the errors. and there's where I'm stuck again... I would really appreciate some help on this, the forums on DevIL are a bit too sleepy so I haven't gotten an answer there.