Cross compiling DLL
deckrider
deckrider at gmail.com
Thu Dec 18 21:33:18 EST 2008
I'm not an expert in this, but I have been able to make this happen with
the bot-sentry plugin:
http://pidgin-bs.sf.net/
See especially README.mingw and mingw-purple-dev.sh in the source ball.
On Thu, Dec 18, 2008 at 09:00:10PM -0500, Michael Luich wrote:
> Hello Everyone,
>
> I'm trying to build a plugin by cross compiling from linux to windows
> using mingw. The Linux version compiles and works, and the Windows
> version compiles but gives me errors when it tries to load. I made a
> test dll with the same code for the windows dll and it loaded fine
> (errored missing purple_init)plugin) which leads me to believe my
> windows dll stuff is correct.
>
> Does anyone have any ideas? any way I can troubleshoot this?
>
> Mike Luich
>
> Error:
> C:\Program Files\Pidgin\plugins\srencrypt.dll is not loadable: %1 is
> not a valid Win32 application.
>
>
> Windows dll code:
> #ifdef BUILD_DLL
> /* DLL export */
> #define EXPORT __declspec(dllexport)
> #else
> /* EXE import */
> #define EXPORT __declspec(dllimport)
> #endif
>
>
> Build line:
> i686-pc-mingw32-gcc -shared -DBUILD_DLL -c srencrypt.c -lws2_32
> -lssl.dll -lcrypto.dll -DHAVE_CONFIG_H -I.
> -DLOCALEDIR=\"/usr/i686-pc-mingw32/sys-root/mingw/share/locale\"
> -DLIBDIR=\"/usr/i686-pc-mingw32/sys-root/mingw/include//pidgin/\"
> -DDATADIR=\"/usr/i686-pc-mingw32/sys-root/mingw/share/\"
> -I/usr/i686-pc-mingw32/sys-root/mingw/include/pidgin
> -I/usr/i686-pc-mingw32/sys-root/mingw/include/gtk-2.0
> -I/usr/i686-pc-mingw32/sys-root/mingw/lib/gtk-2.0/include/
> -I/usr/i686-pc-mingw32/sys-root/mingw/include/libpurple
> -I/usr/i686-pc-mingw32/sys-root/mingw/include/atk-1.0
> -I/usr/i686-pc-mingw32/sys-root/mingw/include/cairo
> -I/usr/i686-pc-mingw32/sys-root/mingw/include/pango-1.0
> -I/usr/i686-pc-mingw32/sys-root/mingw/include/glib-2.0
> -I/usr/i686-pc-mingw32/sys-root/mingw/include/libpurple
> -I/usr/i686-pc-mingw32/sys-root/mingw/include/glib-2.0
> -I/usr/i686-pc-mingw32/sys-root/mingw/include/nss3
>
> -I/usr/i686-pc-mingw32/sys-root/mingw/include/nspr4
> -I/usr/i686-pc-mingw32/sys-root/mingw/include/gtk-2.0
>
> -I/usr/i686-pc-mingw32/sys-root/mingw/include/atk-1.0
> -I/usr/i686-pc-mingw32/sys-root/mingw/include/cairo
>
> -I/usr/i686-pc-mingw32/sys-root/mingw/include/pango-1.0
> -I/usr/i686-pc-mingw32/sys-root/mingw/include/glib-2.0
> -I/usr/i686-pc-mingw32/sys-root/mingw/include/glib-2.0/glib/
> -I/usr/i686-pc-mingw32/sys-root/mingw/lib/glib-2.0/include/
> -Wall
> -fno-strict-aliasing -o windows/srencrypt.dll
>
> _______________________________________________
> Devel mailing list
> Devel at pidgin.im
> http://pidgin.im/cgi-bin/mailman/listinfo/devel
More information about the Devel
mailing list