我想知道是否有任何方法向Python公开C++类,但不构建中间共享库。
这是我想要的情景。例如,我有以下C++类:
class toto
{
public:
toto(int iValue1_, int iValue2_): iValue1(iValue1_), iValue2(iValue2_) {}
int Addition(void) const {if (!this) return 0; return iValue1 + iValue2;}
private:
int iValue1;
in