Boost logo

Boost :

From: Adrien Hernot (amh_at_[hidden])
Date: 2001-03-30 05:20:05


I have link-time error when compiling the folowing code:

#include "test.h"

boost::python::class_builder<test> test_class(hello, "test");
test_class.def(&test::f1, "f1");

with test.h containing:

class test {
    test() {};
    void f1(int) {};

The errror message line broken by me (from MSVC6):
hello.obj : error LNK2001: unresolved external symbol "class test & __cdecl
from_python(struct _object *,struct boost::python::type<class test &>)"

BUT it appears that adding an non void constructor to test.h
and augmenting the wrapper accordingly:
   test(int) {}
will link correctly.
I tried to have a look the BPL source, with no success.

Has someone an explanation for this behaviour ?


Adrien Hernot

Boost list run by bdawes at, gregod at, cpdaniel at, john at