Advertisement

DevIL & Dev-C++

Started by June 16, 2002 02:18 PM
51 comments, last by guppy 22 years, 1 month ago
Ok, two things:

1. Yes, DevIL can do mipmapping with OGL. When I said that I didn''t think it could, I was referring only to the ilutGLLoadImage function (which does everything for you).

2. I have narrowed down the error in my code. It occurs in the last line, when I try to delete the image. I tried adding a little error-proofing, but I still get the same same run-time error. (I know it is this line because, when I commented it out, the program ran fine).

Here it is:

      if(ilGetData() != NULL)        ilDeleteImages(1, &Texs[0]);  

I seem to be having problems compiling code which uses ilut functions such as: ilutGLTexImage().

The error I receive would be:
implicit declaration of function `int ilutGLTexImage(...)''

Yes, I am including the proper headers, and ilut.h does seem to declare this function. If anybody could shed some light on this, it would be greatly appreciated.

"Don''t be afraid to dream, for out of such fragile things come miracles."
Advertisement
What parameters are you passing?
I''m passing 0, as I believe it asks for an integer describing what mip level it is to be.

By the way, I''m specifically referring to a problem using Dev-C++ as well. The code compiles fine on MSVC.

"Don''t be afraid to dream, for out of such fragile things come miracles."
Weird... you definitely must not be including something (even though you say you are), because the code I posted compiles fine with Dev-C++.
Considering that I''m only having this problem with Dev-C++, I''m thinking it has to be something related to that.

"Don''t be afraid to dream, for out of such fragile things come miracles."
Advertisement
I doubt that it has anything to do with Dev-C++. Are you using the files that Guppy uploaded to his website? I have gotten them to work with Dev-C++.

If you can, post some of code. I think you might be redefining the function somewhere in your code, because of the error you are getting ("implicit declaration of ''int ilutGLTexImage()''"). That function is defined as ILboolean, so you must be changing it somewhere.
No, I am not redefining it elsewhere. Like I said, it compiles fine using another compiler. The reason it says "int" in its error message is because ILboolean is a typedef of int. The implicit definition error is normally caused due to the compiler not finding its definition prior to this call, for some reason or another.

My guess originally was that part of the pre-compilation process wasn''t working correctly, and causing the function definition not to be introduced. You know, between #ifdef USING_SOME_COMPILER #endif blocks.

And no, I''m using the headers that came from DevIL''s site directly. I was under the impression that guppy had recompiled the libraries, not rewritten the headers.

"Don''t be afraid to dream, for out of such fragile things come miracles."
As for my code:
ILboolean result = ilutGLTexImage(0); 

There you go.

I''m not saying that there is something wrong with Dev-C++. What I''m saying is that it have something to do with using a DevIL setup that is not compatible with Dev-C++. I downloaded the one meant to be used with GCC. Did I make a mistake in doing this?

"Don''t be afraid to dream, for out of such fragile things come miracles."
This error has me stumped. The only thing I can say is to use all of the files Guppy uploaded to his site. I believe that he only recompiled the libraries, but I am not positive. All I know is that using Guppy''s files, I am able to use DevIL in my programs (now, I am having trouble with ilDeleteImage, but that is a run-time error, not a compilation error).

This topic is closed to new replies.

Advertisement