www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - How to use C++ static library in d

reply Hima <hima gptouch.com> writes:
Hello everyone. I'm wondering is there a way to use a C++ static library in D?

I only have the .h and .lib files of the library, but not .dll or .cpp

Thank you in advance :) 
May 10 2009
parent Walter Bright <newshound1 digitalmars.com> writes:
Hima wrote:
 Hello everyone. I'm wondering is there a way to use a C++ static library in D?
 
 I only have the .h and .lib files of the library, but not .dll or .cpp

D 2.0 can interface directly with C++ free functions and single inheritance hierarchies. If you need to go further than that, the way is to create a C wrapper for the C++ code, then D can call the C wrapper.
May 10 2009