Using C/C++-DLL in D

S0urc3C0de s0urc3c0de at d.learn
Mon Aug 26 16:00:00 PDT 2013


On Monday, 26 August 2013 at 22:17:07 UTC, Adam D. Ruppe wrote:
> When you run implib, did you use the /s option? implib /s 
> either adds or removes the leading underscore from the name (I 
> don't remember which)... so if you didn't use it, try adding 
> that and see what happens, and if you did, see what happens if 
> you remove that option.

Hmm nope I did not but tried it now: same error.
By the way: I should correct the error message from above. The 
correct error from dmd is:
Error 42: Symbol Undefined ?printCpp@@YAXXZ (void cdecl 
printCpp(void ))

The error message from above occurs when I write extern(C) 
instead of extern(C++) but due to the fact that it is C++-DLL, 
extern(C++) should be correct, shouldn't it?

Maybe, someone here already wrote a program that uses a C/C++-Lib 
and may tell me what he exactly did?


More information about the Digitalmars-d-learn mailing list