D and .lib files. C++/Other?

Damien Gibson via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Jul 1 12:11:19 PDT 2017


> Not sure if this is the issue you're having, but if you're 
> using .lib files on Windows, note that DMD, the D compiler, 
> will by default, on 32bit, output a format (OMF) that is not 
> compatible what Visual Studio is using (COFF). For 64bit, DMD 
> outputs COFF .lib files. For 32bit, use the -m32mscoff flag.

I do happen to be on 32bit only machine right now, my last pc 
broke recently lol but yeah i tried that mscoff flag which gave 
me the conclusion listed above maybe I'm supposed to use another 
compiler (or maybe i needed more flags than just that)

> Mixing C++ and D DLLs should work. If you're statically linking 
> the DLL, which requires import libraries on Windows, you might 
> have the above issue.

I assumed so that it SHOULD work, as i found multiple documents 
online talking about using them together but non specifying if 
there should be special stuff you would have to do on making dlls 
that mix them.... As well I only intended to use shared libraries 
not static ones...

I did see a lot of stuff talking about loading the dlls from some 
special code you would place in your app to load them manually 
which gave me concerns maybe using .lib files were not possible 
between the langs -> Which prompted me to come here for help as a 
last resort.


More information about the Digitalmars-d-learn mailing list