Cross-compiling with mingw?

Simon Ejsing simon at esoft.dk
Mon Jun 14 13:05:07 UTC 2004


	Have anyone tried cross-compiling with mingw from KDevelop, and if so, how do 
I set it up correctly?

	I want to be able to build my application for both Linux and Windows, from 
the same project, but using different build types. I'm using Gentoo Linux, 
and have emerged the following packages:
	- dev-util/xmingw-binutils
	- dev-util/xmingw-gcc
	- dev-util/xmingw-runtime
	- dev-util/xmingw-w32api

	I'm stuck at selecting the correct compiler. I've made a new build type named 
"windows", but I can't select the mingw compiler from the "Project Options" > 
"Configure Options" > "C++" > "C++ Compiler". Is this because the mingw 
compiler isn't located by KDevelop? The prefix path is "/opt/xmingw/bin/", 
maybe I need to set an environment variable?

	Do I need to specify the compiler as the "Compiler command CXX" field? If so, 
what executable should I use from the mingw package? I've tried this approach 
but it seems to fail during the configure, saying (using 
"/opt/xmingw/bin/i386-mingw32msvc-gcc" as CXX):
	*checking for C++ compiler default output file name...  
	*configure: error: C++ compiler cannot create executables 

	If what I'm doing is totally wrong, and impossible, is there another way to 
cross-compile for Windows?

	Thank you for your time.

-- 
Simon Ejsing, Systemudvikler
esoft ApS, http://www.esoft.dk
Skibhusvej 52C, DK-5000 Odense C.
Tlf: 70 222 466, Fax: 63 122 466




More information about the KDevelop-devel mailing list