d与c++接口,类似这样.
extern(C++, cv){
extern(C++, class) struct Size_(T){
@disable this();
~this() { }
final T area() const;
final double aspectRatio() const;
final bool empty() const;
T width; //!< the width
T height; //!< the height
}
}
编译命令类似这样:
link d.obj 常用.obj phobos2-ldc.lib druntime-ldc.lib
用微软的链接器,用ldc2的编译器.
浙公网安备 33010602011771号