|
Boost-Build : |
Subject: Re: [Boost-build] Boost-build Digest, Vol 70, Issue 16
From: Ðлег СелÑнин (kolobok-s_at_[hidden])
Date: 2011-06-23 02:40:29
Hi Kolobok, You are not the only person suffering this pain - I got the similar build issue and I've downloaded several versions of pre-built boost.python libs, none of them are good. I'm tracing the definition of fin_static_type() - it is defined and I can compile the object with that symbol, but after link it to the lib, the symbol just disappeared. Cheers, Charles > > ------------------------------ > > Message: 6 > Date: Wed, 22 Jun 2011 09:27:25 +0400 > From: ???? ??????? <kolobok-s@bk.ru> > To: boost-build@lists.boost.org > Subject: [Boost-build] Boost.Python build trouble > Message-ID: <313872754.20110622092725@bk.ru> > Content-Type: text/plain; charset=windows-1251 > > I'm trying to build "simple" tutorial described at http://www.boost.org/doc/libs/1_46_1/libs/python/doc/tutorial/doc/html/index.html > > #include <boost/python/module.hpp> > #include <boost/python/def.hpp> > > char const* greet() > { > return "hello, world"; > } > > BOOST_PYTHON_MODULE(hello_ext) > { > using namespace boost::python; > def("greet", greet); > } > > I downloaded boost 1.46.1 sources, built them with bjam after a tons of > headache with Python 3.2. > My %HOME%\user-config.jam is > > # MSVC configuration > using msvc : 9.0 ; > > # Python configuration > using python : 3.2 : d:/Dev/Python.3.2.Source ; > > I tried to build tutorial with bjam and ms vs 2008. The only but not > less persistent error I get in both cases is > > Error 1 error LNK2019: unresolved external symbol > "__declspec(dllimport) struct _object * __cdecl > boost::python::detail::init_module(struct PyModuleDef &,void > (__cdecl*)(void))" > (__imp_?init_module@detail@python@boost@@YAPAU_object@@AAUPyModuleDef@@P6AXXZ@Z) > referenced in function _PyInit_hello_ext hello.obj > > As deep as I can dig in Internet I encountered that error with this > function car appear while PY_VERSION_HEX definition is wrong > http://stackoverflow.com/questions/5810101/undefined-boost-python-symbol-boostpythondetailinit-module > boost::python::detail::init_module(char const*, void (*)()) - for Python 2.x > and > boost::python::detail::init_module(PyModuleDef&, void (*)()) - for Python 3.x > > But the only definition for PY_VERSION_HEX I found is in %PYTHONROOT%\Include\patchlevel.h > and here it is > > #define PY_MAJOR_VERSION 3 > #define PY_MINOR_VERSION 2 > #define PY_MICRO_VERSION 0 > #define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL > #define PY_RELEASE_SERIAL 0 > > #define PY_VERSION_HEX ((PY_MAJOR_VERSION << 24) | \ > (PY_MINOR_VERSION << 16) | \ > (PY_MICRO_VERSION << 8) | \ > (PY_RELEASE_LEVEL << 4) | \ > (PY_RELEASE_SERIAL << 0)) > > as I can understand it is 0x030200xx00 that is greater then > 0x03000000. And I'm still have the error. > > I tried to locate *.lib's contain > init_module@detail@python@boost@@YAPAU_object@@AAUPyModuleDef@@P6AXXZ@Z. > THere are some in %BOOSTROOT%stage\lib\ folder > > libboost_python-vc90-mt.lib > libboost_python-vc90-mt-1_46_1.lib > libboost_python-vc90-mt-gd.lib > libboost_python-vc90-mt-gd-1_46_1.lib > libboost_python3-vc90-mt.lib > libboost_python3-vc90-mt-1_46_1.lib > libboost_python3-vc90-mt-gd.lib > libboost_python3-vc90-mt-gd-1_46_1.lib > > and in %BOOSTROOT%libs\python\example\tutorial\ (folder with C++ code > fron the tutorial) library > > boost_python-vc90-mt-gd-1_46_1.lib > > (near to which located boost_python-vc90-mt-gd-1_46_1.dll) > But even inserting each library with its full path in project > properties\linker\input\addiditional dependencies, as well as pointing > %BOOSTROOT%libs\python\example\tutorial\ in project > properties\linker\additional library directories have no positive > effect. > > Can't even describe my emotions. > > Will appreciate any help. > > -- > ? ?????????, > ???? mailto:kolobok-s@bk.ru > > > > ------------------------------ > > _______________________________________________ > Boost-build mailing list > Boost-build@lists.boost.org > Unsubscribe and other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build > > > End of Boost-build Digest, Vol 70, Issue 16 > ******************************************* |
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk