
I want to export C++ class...use boost lib but link error occured... help me. #include <windows.h> #include <boost/python/class_builder.hpp> #include <string> namespace python = boost::python; class CBaseBox { public: CBaseBox() {}; void move(); private: std::string a; }; void CBaseBox::move() { MessageBox(NULL, "kkm", "kkm", MB_OK); } BOOST_PYTHON_MODULE_INIT(tuesday) { python::module_builder this_module("tuesday"); python::class_builder<CBaseBox> CBaseBox_class(this_module, "CBaseBox"); CBaseBox_class.def(&CBaseBox::move , "move"); } --------------------Configuration: tuesday - Win32 Debug-------------------- Compiling... export.cpp Linking... Creating library pyds\./tuesday_d.lib and object pyds\./tuesday_d.exp export.obj : error LNK2001: unresolved external symbol "class CBaseBox & __cdecl from_python(struct _object *,struct boost::python::type<class CBaseBox &>)" (?from_python@@YAAAVCBaseBox@@PAU_object@@U?$type@AAVCBaseBox@@@python@boost @@@Z) pyds\.\tuesday_d.pyd : fatal error LNK1120: 1 unresolved externals Error executing link.exe.
participants (1)
-
kiminkim