compilation issues in a shared library project

Benjamin Thaut via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jun 9 07:30:23 PDT 2015


On Sunday, 7 June 2015 at 21:11:38 UTC, Jonathan Villa wrote:
>
> Compilation line:
>
> Current dictionary: 
> C:\Users\JVortex\Documents\Projects\DataTable2
> dmd.exe -O -release "DataBlockHeader.d" "DataBlock.d" 
> "DataTable2.d"   
> "-L/IMPLIB:C:\Users\JVortex\Documents\Projects\DataTable2\bin\Release\DataTable2.lib" 
> "-odobj\Release" 
> "-ofC:\Users\JVortex\Documents\Projects\DataTable2\bin\Release\DataTable2.dll" 
> -w -vcolumns
>
> Is that the info you're asking for? If not, please tell me.

Shared libraries (DLLs) don't work on windows. They only work for 
the simplest of all cases (e.g. global functions) and even then 
there are pitfalls. Just don't do it. The only viable option 
currently is to link statically or put _all_ your D code into one 
single Dll and use that Dll from C. Any other use case is bound 
to fail. I'm currently working on propper dll support for D but 
it is a lot of work.

Kind Regards
Benjamin Thaut


More information about the Digitalmars-d-learn mailing list