You are not logged in.

#1 2008-12-18 16:16:10

Scorpiion
Member
Registered: 2008-10-03
Posts: 16

Cross compile "Hello World" C++

Hi, I have been trying to search on the internet for how to cross complie a simple "Hello World" program on a linux box so that you can exeute it later on an windows computer... If anyone knows about this please let me know! smile

And I looking for how to do it from the commandline....

Best Regards, Robert

Offline

#2 2008-12-18 17:27:11

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Cross compile "Hello World" C++

Well, the win32 C runtime is wildly different. The best thing you could do is compile it against the cygwin dll, which is messy as you need to distribute that dll with your app. Take a look at how cygwin bootstraps their builds.

Offline

#3 2008-12-18 18:17:37

Scorpiion
Member
Registered: 2008-10-03
Posts: 16

Re: Cross compile "Hello World" C++

Hm.. okey.. sounds kind of complicated... But I'll try to look up those a little thanks..

Offline

#4 2008-12-18 18:45:43

archlinuxsagi
Member
Registered: 2008-09-12
Posts: 259

Re: Cross compile "Hello World" C++

Hi.
You should download mingw32 from community.
I have successfully cross compiling my qt application using this package and mingw32-qt from AUR.

For example of compiling a main application. Please refer to below URL.
http://www.gentoo-wiki.info/HOWTO_MinGW

I haven't try compiling the Winmain routine. But it is similar in Arch and you should use i486-mingw32-gcc to compile.

Offline

#5 2008-12-18 19:41:41

Scorpiion
Member
Registered: 2008-10-03
Posts: 16

Re: Cross compile "Hello World" C++

Hi and thank you very much!! It works big_smile

Offline

Board footer

Powered by FluxBB