[python] unresolved docstring_options symbols with 1.34.0 using msvc 8 and 9
Hi I'm having some problems moving from boost 1.33.1 to 1.34.0. More specifically my python extension isn't linking anymore:
Searching W:\boost_1_34_0\stage\lib\boost_python-vc80-mt.lib: Finished searching libraries MagicMarker.obj : error LNK2001: unresolved external symbol "private: static bool volatile boost::python::docstring_options::show_user_defined_" (?show_user_defined_@docstring_options@python@boost@@0_NC) MagicMarker.obj : error LNK2001: unresolved external symbol "private: static bool volatile boost::python::docstring_options::show_signatures_" (?show_signatures_@docstring_options@python@boost@@0_NC)
That seems to be statistics however: W:\boost_1_34_0\bin.v2\libs\python\build\msvc-8.0\debug>dumpbin /symbols function.obj | findstr docstring ... 1B4 00000004 SECT7 notype External | ?show_user_defined_@docstring_options@python@boost@@0_NC (private: static bool volatile boost::python::docstring_options::show_user_defined_) 1B5 00000005 SECT7 notype External | ?show_signatures_@docstring_options@python@boost@@0_NC (private: static bool volatile boost::python::docstring_options::show_signatures_) ... W:\boost_1_34_0\stage\lib>dumpbin /exports boost_python-vc80-mt.lib | findstr docstring_options ... ?show_signatures_@docstring_options@python@boost@@0_NC (private: static bool volatile boost::python::docstring_options::show_signatures_) ?show_user_defined_@docstring_options@python@boost@@0_NC (private: static bool volatile boost::python::docstring_options::show_user_defined_) ... Any ideas? j
Since I guess it might make things a little easier I created this example
project. The project and solution files were created with VC9 which I guess
not too many will be running, but the example itself could hardly be any
simpler and VC8 works/doesn't work just as well. The entire code is
#include
Hi
I'm having some problems moving from boost 1.33.1 to 1.34.0. More specifically my python extension isn't linking anymore:
Searching W:\boost_1_34_0\stage\lib\boost_python-vc80-mt.lib: Finished searching libraries MagicMarker.obj : error LNK2001: unresolved external symbol "private: static bool volatile boost::python::docstring_options::show_user_defined_" (?show_user_defined_@docstring_options@python@boost@@0_NC) MagicMarker.obj : error LNK2001: unresolved external symbol "private: static bool volatile boost::python::docstring_options::show_signatures_" (?show_signatures_@docstring_options@python@boost@@0_NC)
That seems to be statistics however:
W:\boost_1_34_0\bin.v2\libs\python\build\msvc-8.0\debug>dumpbin /symbols function.obj | findstr docstring ... 1B4 00000004 SECT7 notype External | ?show_user_defined_@docstring_options@python@boost@@0_NC (private: static bool volatile boost::python::docstring_options::show_user_defined_) 1B5 00000005 SECT7 notype External | ?show_signatures_@docstring_options@python@boost@@0_NC (private: static bool volatile boost::python::docstring_options::show_signatures_) ...
W:\boost_1_34_0\stage\lib>dumpbin /exports boost_python-vc80-mt.lib | findstr docstring_options ... ?show_signatures_@docstring_options@python@boost@@0_NC (private: static bool volatile boost::python::docstring_options::show_signatures_) ?show_user_defined_@docstring_options@python@boost@@0_NC (private: static bool volatile boost::python::docstring_options::show_user_defined_) ...
Any ideas?
j
on Mon Jul 16 2007, "Johan Johansson"
Hi
I'm having some problems moving from boost 1.33.1 to 1.34.0. More specifically my python extension isn't linking anymore:
Undoubtedly you're missing a source file. I see you're using the VS IDE. What happens when you follow the directions at http://boost.org/libs/python/doc/building.html ? -- Dave Abrahams Boost Consulting http://www.boost-consulting.com The Astoria Seminar ==> http://www.astoriaseminar.com
"David Abrahams"
I see you're using the VS IDE. What happens when you follow the directions at http://boost.org/libs/python/doc/building.html ?
C:\Users\Johan Johansson\dev\boost_1_34_0\libs\python\example\quickstart>bjam toolset=msvc --verbose-test test Building Boost.Regex with the optional Unicode/ICU support disabled. Please refer to the Boost.Regex documentation for more information (don't panic: this is a strictly optional feature). notice: could not find main target test notice: assuming it's a name of file to create don't know how to make <e>test ...found 1 target... ...can't find 1 target... C:\Users\Johan Johansson\dev\boost_1_34_0\libs\python\example\quickstart>
on Tue Jul 17 2007, "Johan Johansson"
"David Abrahams"
wrote in message news:87lkdfqgh9.fsf@grogan.peloton... I see you're using the VS IDE. What happens when you follow the directions at http://boost.org/libs/python/doc/building.html ?
C:\Users\Johan Johansson\dev\boost_1_34_0\libs\python\example\quickstart>bjam toolset=msvc --verbose-test test Building Boost.Regex with the optional Unicode/ICU support disabled. Please refer to the Boost.Regex documentation for more information (don't panic: this is a strictly optional feature). notice: could not find main target test notice: assuming it's a name of file to create don't know how to make <e>test ...found 1 target... ...can't find 1 target...
C:\Users\Johan Johansson\dev\boost_1_34_0\libs\python\example\quickstart>
Oh, that's a bug that has since been fixed. Just leave "test" off the command line. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com The Astoria Seminar ==> http://www.astoriaseminar.com
"David Abrahams"
I see you're using the VS IDE. What happens when you follow the directions at http://boost.org/libs/python/doc/building.html ? Oh, that's a bug that has since been fixed. Just leave "test" off the command line.
Once I've copied the libraries from bin.v2/.... to the quickstart directory and renamed them from *-vc-* to *-vc80-* the tests run fine. For some reason the .lib and .dll is built according to the *-vc-* name pattern but the linker then searches for *-vc80-*-names. Creating additional copies with the indicated name pattern in the original build location does not allow the test to run. I've tried all this with 1.34.1 rc3 as well and there's no difference except for not needing to exclude test - to phrase it backwards. j
"David Abrahams"
I'm having some problems moving from boost 1.33.1 to 1.34.0. More specifically my python extension isn't linking anymore:
Undoubtedly you're missing a source file. I see you're using the VS IDE. What happens when you follow the directions at http://boost.org/libs/python/doc/building.html ?
Just to make sure that there's no trivial misunderstanding: I've built all of boost (that needs to be built) up front using Boost.Build and then linked against the output of that. Given that, could I still be missing a source file and what did we learn from the quickstart example working? The output of dumpbin from my original post also seems to suggest that the file is actually built. I've looked at the output of -a -ofilename as suggested in the Building and Test HOWTO but I can't really say that I see any difference that matters. j
on Tue Jul 17 2007, "Johan Johansson"
"David Abrahams"
wrote in message news:87lkdfqgh9.fsf@grogan.peloton... I'm having some problems moving from boost 1.33.1 to 1.34.0. More specifically my python extension isn't linking anymore:
Undoubtedly you're missing a source file. I see you're using the VS IDE. What happens when you follow the directions at http://boost.org/libs/python/doc/building.html ?
Just to make sure that there's no trivial misunderstanding: I've built all of boost (that needs to be built) up front using Boost.Build and then linked against the output of that. Given that, could I still be missing a source file and what did we learn from the quickstart example working? The output of dumpbin from my original post also seems to suggest that the file is actually built.
We learned that you're building your own extension module or application differently than Boost.Build is... or there's just a bug in the vc9 linker.
I've looked at the output of -a -ofilename as suggested in the Building and Test HOWTO but I can't really say that I see any difference that matters.
I suggest looking harder. If that doesn't work, replace the quickstart example code with your code and see if it works through Boost.Build. HTH, -- Dave Abrahams Boost Consulting http://www.boost-consulting.com The Astoria Seminar ==> http://www.astoriaseminar.com
"David Abrahams"
I've looked at the output of -a -ofilename as suggested in the Building and Test HOWTO but I can't really say that I see any difference that matters.
I suggest looking harder. If that doesn't work, replace the quickstart example code with your code and see if it works through Boost.Build.
HTH,
It did help. In case someone else comes a-googling for the same problem: the quickstart example doesn't have any opinion about linkage which means the auto-linking kicks in and that just works. I was trying to link statically which means I defined BOOST_PYTHON_STATIC_LIB and for reasons I no longer remember BOOST_PYTHON_SOURCE. This worked with 1.33.1 but apparently turns off the auto-linking in 1.34.0, which I don't think was used by Boost.Python before, and auto_link.hpp would have told me that I was trying to link statically and dynamically at the same time. Regarding the inconsistency between library names, using --toolset=msvc-8.0 instead of --toolset=msvc solved that problem. Thanks for the coaching. I really appriciate it. j
on Wed Jul 18 2007, "Johan Johansson"
"David Abrahams"
wrote in message news:87y7heuzlu.fsf@grogan.peloton... Regarding the inconsistency between library names, using --toolset=msvc-8.0 instead of --toolset=msvc solved that problem.
Thanks for the coaching. I really appriciate it.
My pleasure. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com The Astoria Seminar ==> http://www.astoriaseminar.com
participants (2)
-
David Abrahams
-
Johan Johansson