Omnimaga

General Discussion => Technology and Development => Computer Programming => Topic started by: miotatsu on May 09, 2011, 08:17:21 pm

Title: how to set up a windows/linux C++ cross-compiler on linux?
Post by: miotatsu on May 09, 2011, 08:17:21 pm
I am interested in compiling my C++ games for windows for obvious reasons, but do not have a computer that runs windows. I do have a backup of an image of xp for use with a virtual machine but I would rather not use windows at all if it can be avoided. I know that it is possible to compile a windows executable (such as mingw with wine?) but I don't know the details for setting a system up to do it. I know what needs to be changed in the code itself for it to work on windows, I just need to know how to compile a windows executable from a linux pc. Can anyone here help me?  :-X
Title: Re: how to set up a windows/linux C++ cross-compiler on linux?
Post by: Juju on May 09, 2011, 08:22:01 pm
winegcc, winebuild and stuff like that came with my wine installation.

So I guess winegcc works exactly like gcc for linux in command line, you just have to specify CC=winegcc CPP=wineg++ or something.

EDIT:
Code: (bash) [Select]
julien@amy:~$ wineg++ --version
g++ (GCC) 4.6.0 20110429 (prerelease)
Copyright © 2011 Free Software Foundation, Inc.
Ce logiciel est libre; voir les sources pour les conditions de copie.  Il n'y a PAS
GARANTIE; ni implicite pour le MARCHANDAGE ou pour un BUT PARTICULIER.
:D
Title: Re: how to set up a windows/linux C++ cross-compiler on linux?
Post by: miotatsu on May 09, 2011, 08:24:18 pm
hm I will look into it :O
that is not what I was looking for

edit: found this http://www.jonshouse.co.uk/linuxmingw.cgi
Title: Re: how to set up a windows/linux C++ cross-compiler on linux?
Post by: FloppusMaximus on May 09, 2011, 10:13:58 pm
Debian includes the mingw32 cross compiler; it works fine in my experience.  (Actually, it includes both "mingw32" and "gcc-mingw32" - I don't really know what the difference is, apart from politics.)  You can also build your own, which is easier than you might think.