[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to cross compile Debian -> Windows ???

Le jeudi 3 mai 2007 09:07, Joost Kraaijeveld a écrit :
> Hi,
> I have written a small "Hello world" program that I want to cross
> compile from Debian to Windows using the Mingw32 package. I can run
> "configure" both on Debian and on Windows without problem.
> Can anyone give me the correct syntax for calling configure so that I
> can compile the program on Linux and run it on Windows?
> I tried something like:
> /configure
> 	--build=i686-pc-linux-gnu
> 	--host=i686-pc-linux-gnu
> 	--target=i686-pc-mingw32
> but that did not do the trick on my AMD64 Debian Etch (I think the
> configuration names do not match but how can I find the correct
> ones???).

dpkg -c /var/cache/apt/archives/mingw32_3.4.5.20060117.1.dfsg-2_i386.deb
drwxr-xr-x root/root         0 2006-12-23 06:26 ./usr/bin/
-rwxr-xr-x root/root     81336 2006-12-23 06:26 ./usr/bin/i586-mingw32msvc-g++
hrwxr-xr-x root/root         0 2006-12-23 06:26 ./usr/bin/i586-mingw32msvc-c++ 
-rwxr-xr-x root/root     80696 2006-12-23 06:26 ./usr/bin/i586-mingw32msvc-cpp
-rwxr-xr-x root/root     80696 2006-12-23 06:26 ./usr/bin/i586-mingw32msvc-gcc

so the name you are looking for is 'i586-mingw32msvc' but you should only set 
the host and not the target (others are autodetected), so simply try this :

./configure --host=i586-mingw32msvc

it will emit a warning which you can ignore for now. I'm not sure this is the 
conventional way of doing it, but it works for me.

Cédric Lucantis

Reply to: