I want to export C++ class...use boost lib
but link error occured... help me.
#include
#include
#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)"
(?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.