[Solved] Re: Calling D libraries from C, _deh_beg madness and exception handling
BCS
BCS at pathlink.com
Mon Oct 29 17:28:52 PDT 2007
Nicolay Korslund wrote:
> Nicolay Korslund Wrote:
>
>>Is there any way to make DMD insert the correct symbols without having a D main? Or can I set them up myself somehow? I don't even know what these pointers are supposed to point to.
>>
>
>
> Apparantly the solution was to add an empty main() function in D code somewhere. For some reason this did not create a conflict with the C main(), so now everything is peace and harmony. Let's just hope it doesn't suddenly stop working again at some point.
>
> N
IIRC there is an extern(C)main defined in phobos that calls the D main.
because of the way that linkers work, the main in phobos gets cover up
by just about anything that should get precedence. So while I'd still
call you code a hack/workaround, I'd say it should keep working.
More information about the Digitalmars-d
mailing list