Page 1 of 1

GFL with DevC++

Posted: Fri Oct 08, 2004 7:57 pm
by Luk
It's possible to use GFL libraries with DevC++ (mingw compiler) ???? If it's , how to do this ?
Thnks

Re: GFL with DevC++

Posted: Sat Oct 09, 2004 6:33 am
by xnview
Luk wrote:It's possible to use GFL libraries with DevC++ (mingw compiler) ???? If it's , how to do this ?
You can use GFL librairies by dynamic loading. Use LoadLibrary/GetProcAdress
Pierre.

Posted: Mon Feb 14, 2005 2:38 pm
by Ithier
It is even easier. First you have to modify the header files (libgfl.h and libgfle.h), replace the folowing lines

Code: Select all

#ifdef WIN32
	#ifdef __BORLANDC__
		#pragma option -a8  /* switch to 8-bytes alignment */
	#else
		#pragma pack (push, before_push)
		#pragma pack (8)
	#endif
#else
#endif
by

Code: Select all

#ifdef WIN32
    #if defined (__BORLANDC__)
        #pragma option -a8  /* switch to 8-bytes alignment */
    #elif defined (__MINGW32__)
        #pragma pack (push, before_push, 8)
    #else
        #pragma pack (push, before_push)
        #pragma pack (8)
    #endif
#else
#endif
Then you have to create .a files. To do that use the reimp tool (in your dev-cpp\bin directory) on the .lib provided (ex: reimp libgfl.lib).
Then copy the .a in the dev-cpp\lib directory.
Now you can use the library as other libraries and call the functions as normal functions.