www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Cross-compilation

reply "Chris" <wendlec tcd.ie> writes:
Probably this question has been asked and answered before, but I 
wonder if there is a way to cross-compile D code so that you can 
work on one platform and simultaneously create code for other 
platforms. In my case it would be Mac to Linux. I can imagine 
that there are a lot of dependency issues (especially on Windows).
Aug 28 2012
next sibling parent "sidhu gaikwad" <sidhugaikwad1 gmail.con> writes:
On Tuesday, 28 August 2012 at 09:21:55 UTC, Chris wrote:
 Probably this question has been asked and answered before, but 
 I wonder if there is a way to cross-compile D code so that you 
 can work on one platform and simultaneously create code for 
 other platforms. In my case it would be Mac to Linux. I can 
 imagine that there are a lot of dependency issues (especially 
 on Windows).

Aug 28 2012
prev sibling parent Marco Leise <Marco.Leise gmx.de> writes:
Am Tue, 28 Aug 2012 11:37:48 +0200
schrieb "sidhu gaikwad" <sidhugaikwad1 gmail.con>:

 On Tuesday, 28 August 2012 at 09:21:55 UTC, Chris wrote:
 Probably this question has been asked and answered before, but 
 I wonder if there is a way to cross-compile D code so that you 
 can work on one platform and simultaneously create code for 
 other platforms. In my case it would be Mac to Linux. I can 
 imagine that there are a lot of dependency issues (especially 
 on Windows).


Very informative post. P.S.: Chris, you could try a GCC cross-compiler. It isn't easy the first time, but it should work if done right. One hurdle for example is that you need to chose the correct GDC development branch. The main branch targets the .8 series, which isn't stabilized, and there is a compatibility branch for .7. There is a wiki page on building a GDC cross-compiler somewhere as well, maybe a bit outdated. -- Marco
Aug 29 2012