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

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

On Thu, May 03, 2007 at 09:07:44AM +0200, Joost Kraaijeveld wrote:
> 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???).

Why are you using configure?  autoconf may be useful at times but it
isn't a magical cure to all porting issues.

Also the contents of the mingw32 package makes me think you might want a
target of:

At least the compiler executable is named i586-mingw32msvc-gcc

# i586-mingw32msvc-gcc hello.c -o hello
# file hello
hello: MS-DOS executable PE  for MS Windows (console) Intel 80386 32-bit

Len Sorensen

Reply to: