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
packages.

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

Testing under wine and win3k is running fine.

http://LibSDL.org has a well supported toolchain for win32 cross
compilation.

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/libiconv/lib
-L/home/mdupont/introspector/dia/prefix/gettext/lib --verbose -o
libgmodule-2.0.la -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/libglib-2.0.la -liconv -lintl -liconv

Here is the link command that needs the windres

gcc -mpentium -fnative-struct --verbose
-Wl,–base-file,.libs/libgmodule-2.0-0.dll-base
-Wl,-e,_DllMainCRTStartup at 12 -o .libs/libgmodule-2.0-0.dll gmodule.lo
gmodule-win32res.lo
-L/home/mdupont/introspector/dia/prefix/libiconv/lib
-L/home/mdupont/introspector/dia/prefix/gettext/lib
-Wl,–export-dynamic

it tell mes :
Reading specs from
/usr/local/cross-tools/lib/gcc-lib/i386-mingw32msvc/2.95.3-6/specs
gcc version 2.95.3-6 (mingw special)

here is the full link command :

/usr/local/cross-tools/lib/gcc-lib/i386-mingw32msvc/2.95.3-6/…/…/…/…/i386-mingw32msvc/bin/ld
-Bdynamic -o .libs/libgmodule-2.0-0.dll
/usr/local/cross-tools/lib/gcc-lib/i386-mingw32msvc/2.95.3-6/…/…/…/…/i386-mingw32msvc/lib/crt2.o
-L/home/mdupont/introspector/dia/prefix/libiconv/lib
-L/home/mdupont/introspector/dia/prefix/gettext/lib
-L/usr/local/cross-tools/lib/gcc-lib/i386-mingw32msvc/2.95.3-6
-L/usr/local/cross-tools/lib/gcc-lib/i386-mingw32msvc/2.95.3-6/…/…/…/…/i386-mingw32msvc/lib
–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.

mike=====
James Michael DuPont
http://introspector.sourceforge.net/


Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com