[Solved] Re: Calling D libraries from C, _deh_beg madness and

Nicolay Korslund korslund at gmail.com
Tue Oct 30 00:55:41 PDT 2007


BCS Wrote:

> 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.

Ok, thanks, that's what I suspected. I think this should documented
somewhere, since writing libraries is a pretty important feature and I'm
not the first person to ask about it. The closest thing I could find on the
website is a Windows DLL guide. I might write a cross-language library
guide myself, but I have to play some more with it myself though.



More information about the Digitalmars-d mailing list