Cross-platform DLL's

Craig Black cblack at ara.com
Tue Jun 6 08:48:55 PDT 2006


"kris" <foo at bar.com> wrote in message 
news:e62loh$18ot$1 at digitaldaemon.com...
> pragma wrote:
>> In article <e624e1$du6$1 at digitaldaemon.com>, kris says...
>>
>>>Craig Black wrote:
>>>
>>>>When will D be able to compile the same source to a .dll on windows and 
>>>>a .so on Linux?
>>>
>>>
>>>ddl may resolve this
>>
>>
>> Possibly.
>>
>> The trick here is that Walter has ruled out the possibility of 100% 
>> binary
>> compatibility so using DDL 1.0 as a compile-once* solution is a no-go. 
>> But
>> should Craig need something that fits the use-case of a dll/so, as a 
>> complete
>> D-built dynamic lib, then DDL should work nicely.

Compile-once would be very cool, but it is not necessary for my purposes, so 
I suppose DDL will solve my problems.  I also hear DDL provides run-time 
reflection.  I am very interested in this feature.  How does it do this? 
What is the API look like?

>> * - Some food for thought here: As the ABI below the D compiler level is
>> concerned, DMD backs DMC and GDC backs GCC where exception handling and
>> real-width (80/100bit) are concerned.  This is a good thing as far as 
>> linking
>> with 'native' dynamic and static libs go.  While all this puts the 
>> current
>> toolset out of the running, it doesn't exclude the possibility of 
>> producing
>> completely cross-platform binary solution, at the cost of legacy binary
>> compatibility.  It would just require a custom compiler that backs a 
>> stricter
>> ABI (maybe by the time we land on the moon again).
>>
>> - EricAnderton at yahoo
>
>
> Perhaps cross-platform binaries might come in useful for those who need to 
> hide the implementation. But for the rest of us, just having a single 
> source base that operates on both (without the need to master the 
> underlying relevant ddl/so mechanics) will be awesome! I suspect it's the 
> latter that Craig was getting at?

Yes.  And much thanks to you and all the other contributors that have made 
DDL a possibility.  If it is what I understand it is, I am somewhat in awe 
that you have been able to pull it off.

-Craig 





More information about the Digitalmars-d mailing list