status of shared libs

Rainer Schuetze r.sagitario at gmx.de
Mon Apr 8 11:00:28 PDT 2013



On 07.04.2013 17:19, Martin Nowak wrote:
> On 04/07/2013 10:21 AM, Jacob Carlborg wrote:
>> On 2013-04-07 04:15, Ellery Newcomer wrote:
>> I think it needs weak linkage or similar. I don't know if it's possible
>> to do in D, but in C it can be done like this:
>>
>> https://github.com/D-Programming-Language/druntime/blob/master/src/rt/dylib_fixes.c
>>
>>
>>
> Yes, druntime should only weakly link against _Dmain.
>

I think the correct way is to remove the C main function from dmain2.d 
and put it in an extra library to be linked with the executable. At 
least on Windows, you won't be able to link back from the DLL to the 
main executable.


More information about the Digitalmars-d mailing list