[英]Why boost python built library without any export function?
I built boost python (1.55) without any errors or warnings. 我构建了boost python(1.55),没有任何错误或警告。 Here is list:
这是列表:
C:\Programming\boost>b2 toolset=msvc-11.0 link=static variant=release threading=multi runtime-link=static --with-python
link.jam: No such file or directory
Building the Boost C++ Libraries.
Component configuration:
- atomic : not building
- chrono : not building
- context : not building
- coroutine : not building
- date_time : not building
- exception : not building
- filesystem : not building
- graph : not building
- graph_parallel : not building
- iostreams : not building
- locale : not building
- log : not building
- math : not building
- mpi : not building
- program_options : not building
- python : building
- random : not building
- regex : not building
- serialization : not building
- signals : not building
- system : not building
- test : not building
- thread : not building
- timer : not building
- wave : not building
...patience...
...patience...
...found 1654 targets...
...updating 30 targets...
compile-c-c++ bin.v2\libs\python\build\msvc-11.0\release\link-static\runtime-link-static\threading-multi\numeric.obj
numeric.cpp
..........................
compile-c-c++ bin.v2\libs\python\build\msvc-11.0\release\link-static\runtime-link-static\threading-multi\object\function_doc_signature.obj
function_doc_signature.cpp
msvc.archive bin.v2\libs\python\build\msvc-11.0\release\link-static\runtime-link-static\threading-multi\libboost_python-vc110-mt-s-1_55.lib
common.copy stage\lib\libboost_python-vc110-mt-s-1_55.lib
bin.v2\libs\python\build\msvc-11.0\release\link-static\runtime-link-static\threading-multi\libboost_python-vc110-mt-s-1_55.lib
Скопировано файлов: 1.
...updated 30 targets...
The Boost C++ Libraries were successfully built!
The following directory should be added to compiler include paths:
C:/Programming/boost
The following directory should be added to linker library paths:
C:\Programming\boost\stage\lib
C:\Programming\boost>
EDITED: 编辑:
But if I add it to my project (References -> Linker -> Input -> Additional dependencies), I get linker errors, such as: 但是,如果我将它添加到我的项目(引用 - >链接器 - >输入 - >附加依赖项),我会收到链接器错误,例如:
PyRunnable.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) class boost::python::api::object __cdecl boost::python::api::getitem(class boost::python::api::object const &,class boost::python::api::object const &)" (__imp_?getitem@api@python@boost@@YA?AVobject@123@ABV4123@0@Z)
PyRunnable.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) class boost::python::api::object __cdecl boost::python::api::getattr(class boost::python::api::object const &,char const *)" (__imp_?getattr@api@python@boost@@YA?AVobject@123@ABV4123@PBD@Z)
PyRunnable.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) protected: __thiscall boost::python::detail::str_base::str_base(void)" (__imp_??0str_base@detail@python@boost@@IAE@XZ)
If I use dumpbin /symbols , I even can find methods that are unresolved. 如果我使用dumpbin / symbols,我甚至可以找到未解决的方法。 So, they are inside, but VS2012 ignores them somehow.
所以,他们在里面,但VS2012以某种方式忽略了它们。 Why?
为什么?
In Additional dependencies field there is: 在Additional dependencies字段中有:
libboost_system-vc110-mt-1_55.lib
libboost_program_options-vc110-mt-1_55.lib
libboost_filesystem-vc110-mt-1_55.lib
And no problems with them. 并没有问题。 But if I add there libboost_python-vc120-mt-1_55.lib or not, I still get 15 linker errors.
但是如果我在那里添加libboost_python-vc120-mt-1_55.lib,我仍然会得到15个链接器错误。 What do I do wrong way?
我做错了什么?
Thank you in advance. 先感谢您。
That's normal. 这很正常。 The
dumpbin
/exports
option is for showing functions exported from a PE file (eg a DLL), not for listing the functions in a COFF library. dumpbin
/exports
选项用于显示从PE文件(例如DLL)导出的函数,而不是用于列出COFF库中的函数。
To list the functions in a COFF library, use the /symbols
option: 要列出COFF库中的函数,请使用
/symbols
选项:
dumpbin /symbols libboost_python-vc110-mt-s-1_55.lib
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.