On 2018-05-01 17:14:53 +0000, Robert M. Münch said:
Yes, great! Thanks. I could extend the code now. But I get a next problem:
extern (C++, b2d) {
class AnyBase {
bool isShared();
}
pragma(mangle, "Object");
class b2dObject : AnyBase {
}
class Image : b2dObject {
// class Image {
uint create(int w, int h, uint pixelFormat);
}
}
The linke complains about missing symbols:
error LNK2001: "public: virtual bool __cdecl
b2d::AnyBase::isShared(void)" (?isShared@AnyBase@b2d@@UEBA_NXZ)
error LNK2001: "public: virtual unsigned int __cdecl
b2d::Image::create(int,int,unsigned int)"
(?create@Image@b2d@@UEAAIHHI@Z)
I have in my C++ link lib:
?isShared@AnyBase@b2d@@QEBA_NXZ which demangles to => public: BOOL
__cdecl b2d::AnyBase::isShared(void)const __ptr64
So, the difference is the "virtual" specifier on the D side, while the
C++ mangeling is missing this. I have this for many functions.
Any idea how to handle this?
Answering myself. There is a final keyword missing:
class Image : b2dObject {
// class Image {
final uint create(int w, int h, uint pixelFormat);
}
With this it's working.
--
Robert M. Münch
http://www.saphirion.com
smarter | better | faster