Glib under mingw32 debian cross compiler, problem with windres : gmodule-win32res.lo: file not recognized: File format not recognized

Dear Lists,

Please Excuse the longwinded cross posting, I don’t know the best place
to post this one, so here is the shotgun effect.

I really like the great work that has been done on the mingw under
debian, finally a great way to write windows programs, not in windows.

Hopefully we can get all the cool gnome apps running under windows (or
even under using SDL for graphics for that matter (think GNOME SDL!
(Cool :slight_smile: ))).

For the Funky DIA diagramming editor that i would like to get running
under windows, i need libiconv/gettext/glib/gtk/libxml2/pango and
others I dont know yet. I have heard that tor l. has all of of this
compiling for mingw32.

I have been trying to follow in the footsteps of tor and hand in
porting glibc 2.0.4 to mingw32 cross compiler on debian 3.0 + unstable

I have gotten libiconv and gettext ported with the help of many nice
people on the (ali-g, Diablo, LIM (sorry I
cannot spell) ) . First I recompiled ported them on mingw32, the ported

Testing under wine and win3k is running fine. has a well supported toolchain for win32 cross

I wonder if anyone has ported this before? I think tor has done all of
this… In anycase I have been following the well written instructions
hans and tor on the glib win32 readme.

I had to modify the configure and tell it it is not in a cross compiler
around line 10000, it wanted to check function prototypes, so I let it
use wine to do that.

I dont know if I should use the makefile or the makefile.ming,
if i need to run libtoolize and automake on gettext and
libiconv/libcharset. Hopefully I dont need to do that.

The problem is with the resource compiler :
gmodule-win32res.lo and
gobject-win32res.lo are dependant on the command :
…/build/win32/lt-compile-resource gmodule.rc gmodule-win32res.lo
which complains that :
Using zero as build number

Worse, the windres program is not found,
but it can be configured in, I took mine from the same place as the
compiler :
The /usr/local/cross-tools/bin/i386-mingw32msvc-windres
is not producing proper object files, but I think it is the right one
to use.

here is an example build :

/bin/sh …/libtool --mode=link gcc -mpentium -fnative-struct --verbose
-g -O2 -fnative-struct -Wall -D_REENTRANT
-L/home/mdupont/introspector/dia/prefix/gettext/lib --verbose -o -rpath /home/mdupont/introspector/dia/prefix/glib/lib
-Wl,–export-dynamic -version-info 0:4:0 -export-dynamic -no-undefined
-export-symbols gmodule.def gmodule.lo gmodule-win32res.lo
…/glib/ -liconv -lintl -liconv

Here is the link command that needs the windres

gcc -mpentium -fnative-struct --verbose
-Wl,-e,_DllMainCRTStartup at 12 -o .libs/libgmodule-2.0-0.dll gmodule.lo

it tell mes :
Reading specs from
gcc version 2.95.3-6 (mingw special)

here is the full link command :

-Bdynamic -o .libs/libgmodule-2.0-0.dll
–base-file .libs/libgmodule-2.0-0.dll-base -e _DllMainCRTStartup at 12
gmodule.lo gmodule-win32res.lo --export-dynamic -lmingw32 -lgcc
-lmoldname -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32
-lgcc -lmoldname -lmsvcrt

And then the error :
gmodule-win32res.lo: file not recognized: File format not recognized

Well that pretty much describes my problem,
I hope to hear from anyone that I am doing it much to compilcated and
can do it much easier some other way.

Best regards and keep up the good work.

James Michael DuPont

Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes