View mode: basic / threaded / horizontal-split · Log in · Help
June 17, 2012
DMD + msvc
Is it possible to use the VC2010 linker with DMD? That would allow
easily linking with COFF libraries and building 64 bit binaries.

-- 
Bye,
Gor Gyolchanyan.
June 17, 2012
Re: DMD + msvc
On 2012-06-17 07:15, Gor Gyolchanyan wrote:
> Is it possible to use the VC2010 linker with DMD? That would allow
> easily linking with COFF libraries and building 64 bit binaries.

No.

1. DMD can only output OMF binaries
2. DMD cannot output 64bit code for Windows
3. DMD is not compatible with the MSVC linker or runtime

-- 
/Jacob Carlborg
June 17, 2012
Re: DMD + msvc
On 17.06.2012 9:15, Gor Gyolchanyan wrote:
> Is it possible to use the VC2010 linker with DMD? That would allow
> easily linking with COFF libraries and building 64 bit binaries.
>

You can do it with UniLink, as it's able to link OMF & COFF together.

The problem is that there is no 64 bit object file generator on Windows. 
Last time I've heard about it Walter & co investigated on which way to 
go w.r.t. 64bit toolchain on Windows.

-- 
Dmitry Olshansky
June 17, 2012
Re: DMD + msvc
On Sun, Jun 17, 2012 at 2:34 PM, Jacob Carlborg <doob@me.com> wrote:
> On 2012-06-17 07:15, Gor Gyolchanyan wrote:
>>
>> Is it possible to use the VC2010 linker with DMD? That would allow
>> easily linking with COFF libraries and building 64 bit binaries.
>
>
> No.
>
> 1. DMD can only output OMF binaries
> 2. DMD cannot output 64bit code for Windows
> 3. DMD is not compatible with the MSVC linker or runtime
>
> --
> /Jacob Carlborg

Thanks for the reply.
This is so ridiculous and frustrating.

-- 
Bye,
Gor Gyolchanyan.
June 17, 2012
Re: DMD + msvc
On Jun 17, 2012, at 3:49 AM, Gor Gyolchanyan <gor.f.gyolchanyan@gmail.com> wrote:

> On Sun, Jun 17, 2012 at 2:34 PM, Jacob Carlborg <doob@me.com> wrote:
>> On 2012-06-17 07:15, Gor Gyolchanyan wrote:
>>> 
>>> Is it possible to use the VC2010 linker with DMD? That would allow
>>> easily linking with COFF libraries and building 64 bit binaries.
>> 
>> 
>> No.
>> 
>> 1. DMD can only output OMF binaries
>> 2. DMD cannot output 64bit code for Windows
>> 3. DMD is not compatible with the MSVC linker or runtime
> 
> Thanks for the reply.
> This is so ridiculous and frustrating. 

What about GDC?  Makes me wonder how hard it would be to add a cfront option to DMD. I guess asm blocks make that a bit tricky though.
June 18, 2012
Re: DMD + msvc
On Sunday, 17 June 2012 at 10:49:30 UTC, Gor Gyolchanyan wrote:
> On Sun, Jun 17, 2012 at 2:34 PM, Jacob Carlborg <doob@me.com> 
> wrote:
>> On 2012-06-17 07:15, Gor Gyolchanyan wrote:
>>>
>>> Is it possible to use the VC2010 linker with DMD? That would 
>>> allow
>>> easily linking with COFF libraries and building 64 bit 
>>> binaries.
>>
>>
>> No.
>>
>> 1. DMD can only output OMF binaries
>> 2. DMD cannot output 64bit code for Windows
>> 3. DMD is not compatible with the MSVC linker or runtime
>>
>> --
>> /Jacob Carlborg
>
> Thanks for the reply.
> This is so ridiculous and frustrating.

Yeah, but do note that even if DMD _was_ compatible with the 
VC2010 linker, then that still wouldn't get you 64-bit code...
June 18, 2012
Re: DMD + msvc
On Sunday, 17 June 2012 at 10:49:30 UTC, Gor Gyolchanyan wrote:
> Thanks for the reply.
> This is so ridiculous and frustrating.

Use GDC?
June 18, 2012
Re: DMD + msvc
On 17 June 2012 13:49, Gor Gyolchanyan <gor.f.gyolchanyan@gmail.com> wrote:

> On Sun, Jun 17, 2012 at 2:34 PM, Jacob Carlborg <doob@me.com> wrote:
> > On 2012-06-17 07:15, Gor Gyolchanyan wrote:
> >>
> >> Is it possible to use the VC2010 linker with DMD? That would allow
> >> easily linking with COFF libraries and building 64 bit binaries.
> >
> >
> > No.
> >
> > 1. DMD can only output OMF binaries
> > 2. DMD cannot output 64bit code for Windows
> > 3. DMD is not compatible with the MSVC linker or runtime
> >
> > --
> > /Jacob Carlborg
>
> Thanks for the reply.
> This is so ridiculous and frustrating.
>

I've been bugging Walter for this for months, and the word on the street is
that he's working on it now :)
Intention is to support the MS linker and runtimes (which is what I need
too).
June 18, 2012
Re: DMD + msvc
On 18 June 2012 11:38, Kagamin <spam@here.lot> wrote:

> On Sunday, 17 June 2012 at 10:49:30 UTC, Gor Gyolchanyan wrote:
>
>> Thanks for the reply.
>> This is so ridiculous and frustrating.
>>
>
> Use GDC?
>

I use GDC now. It produces COFF objects, and is technically capable of
linking against MSVC code, except the 2 compilers expect different runtimes.
You have to be REALLY careful with your GDC code to make sure it doesn't
produce implicit calls into the GNU runtime, otherwise you'll get link
conflicts.
You can afford some really standard runtime calls that are also present in
the mscrt, and it'll just link to those instead of the gnu ones.

I have successfully build small scale projects with GDC linking against
MSVC code, but there's a long list of problems and gotchas...
My current approach is to build D code into DLL's and dynamically link
against my MSVC code, or vice-versa.

Hopefully the new 64bit dmd comes soon :)
June 18, 2012
Re: DMD + msvc
On 18 June 2012 16:08, Manu <turkeyman@gmail.com> wrote:
> On 18 June 2012 11:38, Kagamin <spam@here.lot> wrote:
>>
>> On Sunday, 17 June 2012 at 10:49:30 UTC, Gor Gyolchanyan wrote:
>>>
>>> Thanks for the reply.
>>> This is so ridiculous and frustrating.
>>
>>
>> Use GDC?
>
>
> I use GDC now. It produces COFF objects, and is technically capable of
> linking against MSVC code, except the 2 compilers expect different runtimes.
> You have to be REALLY careful with your GDC code to make sure it doesn't
> produce implicit calls into the GNU runtime, otherwise you'll get link
> conflicts.
> You can afford some really standard runtime calls that are also present in
> the mscrt, and it'll just link to those instead of the gnu ones.
>
> I have successfully build small scale projects with GDC linking against MSVC
> code, but there's a long list of problems and gotchas...
> My current approach is to build D code into DLL's and dynamically link
> against my MSVC code, or vice-versa.
>
> Hopefully the new 64bit dmd comes soon :)

DMD would be linking against it's own runtime on windows too, rather
than msvc runtime, iirc. So you may have similar problems there too.


-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';
« First   ‹ Prev
1 2 3
Top | Discussion index | About this forum | D home