Boost logo

Boost Users :

From: kiminkim (yg-boost-users_at_[hidden])
Date: 2002-08-20 04:14:33


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_at_AAVCBaseBox@@@python_at_boost
@@@Z)
pyds\.\tuesday_d.pyd : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net