How to use D for cross platform development?

Iain Buclaw ibuclaw at ubuntu.com
Sun Mar 25 06:13:32 PDT 2012


On 25 March 2012 13:22, maarten van damme <maartenvd1994 at gmail.com> wrote:
> Op 25 maart 2012 13:12 schreef Bennie Copeland <mugen.kanosei at gmail.com> het
> volgende:
>
>> For linking against C, I can create a DLL in windows, but I can't create
>> an .so in linux, and no information at all about OSX.
>
>
> From what I've heard this was a certain bug
>  (http://d.puremagic.com/issues/show_bug.cgi?id=4583) that made it
> impossible to generate position independent code and thus no shared objects.
> This bug was fixed in dmd version 2.057 so it should work with dmd -c -fPIC
> and then use gcc on your platform to create the shared object.
> If you don't need/want to use dmd I think gdc is capable of doing it.


The rule of thumb generally is if you are able to build a gcc C cross
compiler, you can just tack gdc onto it and it will be fine.


Regards

-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';


More information about the Digitalmars-d mailing list