Advice needed with DevIL / OpenIL image library

External libraries (GTK, GSL, SDL, Allegro, OpenGL, etc) questions.
Post Reply
h4tt3n
Posts: 698
Joined: Oct 22, 2005 21:12
Location: Denmark

Advice needed with DevIL / OpenIL image library

Post by h4tt3n »

Hello folks,

TL;DR - If you have a complete, working code sample using the DevIL image library, I'd really like to see it.

I'm currently looking at different image librarys for OpenGL texture loading and noticed the DevIL (previously OpenIL) library. I can see that the necessary headers are included in the FB inc/IL folder, which contains il.bi, ilu.bi, and ilut.bi. Downloading and placing the corresponding .dll files in the lib folder seems to work fine. However, in order to work, DevIL needs a number of other libraries, like the libjpeg, libpng, zlib and a couple of others. Compiling without them throws an error showing which libraries are needed:

Code: Select all

C:\PROGRA~2\FREEBA~1.0-W\FREEBA~1.0-W\bin\win64\ld.exe: cannot find -ljasper
C:\PROGRA~2\FREEBA~1.0-W\FREEBA~1.0-W\bin\win64\ld.exe: cannot find -ljpeg
C:\PROGRA~2\FREEBA~1.0-W\FREEBA~1.0-W\bin\win64\ld.exe: cannot find -ltiff
C:\PROGRA~2\FREEBA~1.0-W\FREEBA~1.0-W\bin\win64\ld.exe: cannot find -lmng
C:\PROGRA~2\FREEBA~1.0-W\FREEBA~1.0-W\bin\win64\ld.exe: cannot find -lpng
C:\PROGRA~2\FREEBA~1.0-W\FREEBA~1.0-W\bin\win64\ld.exe: cannot find -llzma
C:\PROGRA~2\FREEBA~1.0-W\FREEBA~1.0-W\bin\win64\ld.exe: cannot find -lz
On the DevIL download page there's a precompiled zip package with all the necessary libraries, but they only come as static libs, not as dll files. I'm a bit unsure how to proceed with this "dll hell" situation. Some of the libraries already are included in the FB package, but DevIL doesn't seem to recognize them. For others, I've tried placing the missing .dll files only to have the compiler ignore them because they are incompatible.

Realizing that all header and dll files have to be the exactly right version (not necessarily the newest) for this to work, I'm wondering if it's worth the time - or if it even can be made to work? Since the headers are included, I'm assuming that sometime someone got this working. Any form of help or insightful comment is appreciated in advance.

Also: This is by far the most annoying type of coding-related problem that I know of. Tracking down a bug in a pointer to array-of-pointers to arrays of objects in a multithreaded environment - no problem, just apply logic and time. Fixing dll problems - just make me want to strangle someone...

http://openil.sourceforge.net/

Cheers,
Mike
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Re: Advice needed with DevIL / OpenIL image library

Post by D.J.Peters »

why not using fbimage ?

Joshy
h4tt3n
Posts: 698
Joined: Oct 22, 2005 21:12
Location: Denmark

Re: Advice needed with DevIL / OpenIL image library

Post by h4tt3n »

I'll take a look at it and leave this other mess alone.
Post Reply