Hi, i am totally new to using dlls in lite-c. I read the manual but i am still confused. I ask the help of the community, how should use the FreeImage dll in my lite-c project to properly open an image file. Here is the link what i have got: FreeImage Thanks in advance.
Re: Using FreeImage DLL in proper way
[Re: Aku_Aku]
#424452 06/16/1315:0206/16/1315:02
Hi, you can't use a DLL in Lite-C as long as it doesn't export functions in the expected way. What you can do is to write a wrapper DLL that uses the functions from FreeImage.
Some weeks ago I finished a Gamestudio DLL to use cImg with BMAP*. It is part of TUST so you can easily have a look at the source code:
Thanks PadMalcolm. I'll see your link. Where can i find the exact description of that "expected way"?
Edit: This topic was a little bit detoured to this direction: is a dll eligible to serve lite-c calls. Now back to the original problem. I assume this dll is ok. How should i use in my lite-c program?
Last edited by Aku_Aku; 06/16/1315:16.
Re: Using FreeImage DLL in proper way
[Re: PadMalcom]
#424455 06/16/1315:4006/16/1315:40
Hi, you can't use a DLL in Lite-C as long as it doesn't export functions in the expected way.
That's not actually true. The biggest problem is that the Lite-C compiler doesn't create a proper IAT, so the runtime link editor won't do any work for you. However, you can do that manually via LoadLibrary and GetProcAddress.