Public Group

DevIL

This topic is 4723 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

I decided to try the image library DevIL at http://openil.sourceforge.net/. I have Dev-C++, and I can't even get a simple program with it to compile. Here's the program I tried: #include <cstdlib> #include <iostream> #include <IL/il.h> #include <IL/ilu.h> #include <IL/ilut.h> using namespace std; int main(int argc, char *argv[]) { ILuint id, Error; ilInit(); ilGenImages(1, &id); ilBindImage(id); ilLoadImage("default1.tga"); // Loads into the current bound image Error = ilGetError(); system("PAUSE"); return EXIT_SUCCESS; } I got the following errors: [Linker error] undefined reference to _imp__ilInit' [Linker error] undefined reference to _imp__ilGenImages' [Linker error] undefined reference to _imp__ilBindImage' [Linker error] undefined reference to _imp__ilLoadImage' [Linker error] undefined reference to `_imp__ilGetError' By the way, I did link all the libraries in - I still get those errors. Any ideas? Mike C. http://www.coolgroups.com/zoomer/

Share on other sites
The order in which the libraries are specified to GCC is important, adjusting the order in which the libraries are passed might solve your problem.

Share on other sites
Be prepared for several issues to appear using DevIL with GCC. It'd be good to have someone resume the project and work on a real GCC port for it, I kept getting random crashes and heap corruptions under GCC. It seems as if several others have seen the same thing, the DevIL SF forums are full of similar issues.

Share on other sites
Adjusting the order of the libraries didn't fix anything. I tried all six permutations of the three libraries, and it still doesn't work.

Mike C.
http://www.coolgroups.com/zoomer/

Share on other sites
Try:

extern "C" {
#include <IL/il.h>
#include <IL/ilu.h>
#include <IL/ilut.h>
}

Share on other sites
Still doesn't work.

Mike C.
http://www.coolgroups.com/zoomer/

• 22
• 10
• 19
• 15
• 14