|
Boost : |
From: David Abrahams (abrahams_at_[hidden])
Date: 2001-03-30 07:54:17
My best guess is that it's an MSVC linker bug. It wouldn't be the first time
I've seen stuff like this.
Sorry I don't have any better ideas,
Dave
----- Original Message -----
From: "Adrien Hernot" <amh_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Friday, March 30, 2001 5:20 AM
Subject: [boost] BPL problem with void constructors
>
> Hi!
>
> 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(boost::python::constructor<>());
> test_class.def(&test::f1, "f1");
>
>
> with test.h containing:
>
> class test {
> public:
> 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 &>)"
> (?from_python@@YAAAVtest@@PAU_object@@U?$type_at_AAVtest@@@python_at_boost@@@Z)
>
>
> BUT it appears that adding an non void constructor to test.h
> and augmenting the wrapper accordingly:
> test(int) {}
> and
> test_class.def(boost::python::constructor<int>());
>
> will link correctly.
> I tried to have a look the BPL source, with no success.
>
> Has someone an explanation for this behaviour ?
>
> regards,
>
> Adrien Hernot
>
>
>
> To unsubscribe, send email to: <mailto:boost-unsubscribe_at_[hidden]>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk