[C++-sig] Re: Newbie vector_indexing_suite Link Errors

David Brownell db at DavidBrownell.com
Wed Aug 18 22:08:27 CEST 2004


I was attempting to compile and link vector_indexing_suite.cpp, located in
the python\test directory.  It looks like #define'ing
BOOST_PYTHON_STATIC_LIB was all I needed.  Seems strange that I didn't have
to #define this until I started working with the vector_indexing_suite.

Thanks for your help!
David Brownell

"David Abrahams" <dave at boost-consulting.com> wrote in message
news:<uu0v02sim.fsf at boost-consulting.com>...
> "David Brownell" <groups at DavidBrownell.com> writes:
> 
> > I just discovered vector_indexing_suite, and am trying to compile the
sample
> > application that is linked from the documentation. 
> 
> Which one, please?  Linked from where in the documentation?
> 
> > When I compile the C++
> > code, 
> 
> You mean when you try to link.
> 
> > I get the following unresolved externals:
> >
> > __declspec(dllimport) void __cdecl
> > boost::python::objects::register_dynamic_id_aux <snip>
> > __declspec(dllimport) void * __cdecl
> > boost::python::objects::find_static_type <snip>
> > __declspec(dllimport) public: __thiscall
> > boost::python::converter::detail::arg_to_python_base::arg_to_python_base
> > <snip>
> > __declspec(dllimport) void * __cdecl
> > boost::python::objects::find_dynamic_type <snip>
> > __declspec(dllimport) class boost::python::api::object const & __cdecl
> > boost::python::objects::identity_function <snip>
> > __declspec(dllimport) struct _object * __cdecl
> > boost::python::objects::make_nurse_and_patient <snip>
> > __declspec(dllimport) void __cdecl
> > boost::python::objects::stop_iteration_error <snip>
> 
> > It seems strange to me that the symbols are decoared with dllimport
rather
> > than dllexport, but I didn't see any unusual preprocessor magic going on
in
> > the code or described in the documentation that would ensure that these
> > symbols are exported rather than imported. Is there something that I am
> > missing to compile the example?
> >
> > Compiler: Microsoft Visual Studio v7.1
> > OS: Win XP
> > Boost: linking with $(PYTHON_ROOT)\libs\python23.lib and
> > libboost_python-vc71-mt-gd-1_31.lib (which was compiled using bjam)
> > Python: 2.3
> 
> Did you use bjam to build the "sample application?"  If not, do so.
> 
> -- 
> Dave Abrahams
> Boost Consulting
> http://www.boost-consulting.com




More information about the Cplusplus-sig mailing list