Skip to main content
GameDev.net gamedev.net
🔒 Locked

compiling with DevIL static libs not working

Started by Seriema Oct 20, 2004 at 11:30 AM 2 replies 4.1k views
Original Post
Seriema
Seriema
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.
[ ThumbView: Adds thumbnail support for DDS, PCX, TGA and 16 other imagetypes for Windows XP Explorer. ] [ Chocolate peanuts: Brazilian recipe for home made c
kooktroop
kooktroop
can i have a hug anyway?
Do not remove a fly from your friend's forehead with a hatchet.Chinese Proverb
Seriema
Seriema
wth... I was down to 6 small linker errors. Then il_convert.c in DevIL got corrupt. So I had to redownload the whole thing!

Now when I compile, after adding those 3 missing .c files and adding the missing path to the properties. I'm getting 551 linker errors! They're amazing! Not finding delete and other standard stuff!

I'm completely at loss here... a big phat rating++ to whoever can help out...

My build log, clicky.

Both the DevIL and my project are built with the Singelthreaded Debug runtime library, in debug mode. Release mode causes a .c file in DevIL to become corrupt (!). Changing to Multithreaded etc doesn't help.
[ ThumbView: Adds thumbnail support for DDS, PCX, TGA and 16 other imagetypes for Windows XP Explorer. ] [ Chocolate peanuts: Brazilian recipe for home made c
RolandofGilead
RolandofGilead
Okay, I use the dlls, but hopefully this will help.
From my own notes,
Quote:
I also had to include before getting to ilut.h,


[Edited by - RolandofGilead on October 23, 2004 10:49:02 PM]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.