.di header imports with DLL symbols fails to link

Bekenn leaveme at alone.com
Sat Mar 12 20:39:07 PST 2011


On 3/12/2011 7:02 PM, Andrej Mitrovic wrote:
> My commands to compile were:
> dmd -ofmydll.dll mydll.d
> dmd -o- -Hdinclude mydll.d
> dmd driver.d mydll.lib -I%cd%\include

Thanks.

I've tried several things, but can't get the _D5mydll12__ModuleInfoZ 
symbol to show up at all.  The behavior is the same with and without a 
.def file (I tried a few versions).  I even went back to 
http://www.digitalmars.com/d/2.0/dll.html and copied everything
in the "D code calling D code in DLLs" section verbatim.  After fixing a 
few compilation errors (the web page's version of concat needs its 
arguments qualified with "in"), I ended up with the exact same problem 
you're experiencing.

I'd definitely call this a bug.


More information about the Digitalmars-d-learn mailing list