建设加速动态链接给链接错误? [英] Building Boost dynamically linkable gives linking error?

查看:206
本文介绍了建设加速动态链接给链接错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想建立升压和生成的DLL但无论我做并没有解决这个问题。

I am trying to build boost and generate dll's but whatever I have done did not solve the problem.

下面是什么我有:

创建库bin.v2\\libs\\thread\\build\\msvc-11.0\\dbg\\adrs-mdl-32\\async-excpt-on\\thrd-mlt\\boost_thread-vc110-mt-gd-1_53.lib和对象bin.v2\\libs\\thread\\build\\msvc-11.0\\dbg\\adrs-mdl-32\\async-excpt-on\\thrd-mlt\\boost_thread-vc110-mt-gd-1_53.exp
  thread.obj:错误LNK2019:​​无法解析的外部符号__declspec(dllimport的)市民:__thiscall提振::阳历:: greg_month :: greg_month(无符号短)(_ 小鬼的?? 0greg_month @阳历@提振@@ QAE @摹@ Z)的函数引用公众:__thiscall提振::公历日期:: ::日期(枚举的boost :: DATE_TIME :: special_values​​)(?? 0date @阳历@提振@@ QAE @ W4special_values​​ @ DATE_TIME @ 2 @@ Z)
  thread.obj:错误LNK2019:​​无法解析的外部符号__declspec(dllimport的)市民:__thiscall提振::阳历:: greg_month ::运算符号短(无效)常量(_ 小鬼的?? Bgreg_month @阳历@提升@@ QBEGXZ)函数__catch $?make_external_t​​hread_data @?A0x9b8c45f0引用@提振@@ YAXXZ $ 0个
  bin.v2\\libs\\thread\\build\\msvc-11.0\\dbg\\adrs-mdl-32\\async-excpt-on\\thrd-mlt\\boost_thread-vc110-mt-gd-1_53.dll :致命错误LNK1120:2无法解析的外部

Creating library bin.v2\libs\thread\build\msvc-11.0\dbg\adrs-mdl-32\async-excpt-on\thrd-mlt\boost_thread-vc110-mt-gd-1_53.lib and object bin.v2\libs\thread\build\msvc-11.0\dbg\adrs-mdl-32\async-excpt-on\thrd-mlt\boost_thread-vc110-mt-gd-1_53.exp thread.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall boost::gregorian::greg_month::greg_month(unsigned short)" (_imp??0greg_month@gregorian@boost@@QAE@G@Z) referenced in function "public: __thiscall boost::gregorian::date::date(enum boost::date_time::special_values)" (??0date@gregorian@boost@@QAE@W4special_values@date_time@2@@Z) thread.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall boost::gregorian::greg_month::operator unsigned short(void)const " (_imp??Bgreg_month@gregorian@boost@@QBEGXZ) referenced in function __catch$?make_external_thread_data@?A0x9b8c45f0@boost@@YAXXZ$0 bin.v2\libs\thread\build\msvc-11.0\dbg\adrs-mdl-32\async-excpt-on\thrd-mlt\boost_thread-vc110-mt-gd-1_53.dll : fatal error LNK1120: 2 unresolved externals

下面有关安装的一些信息:

Here some information about the setup:

OS:W7 64

命令建立:

B2 -j%NU​​MBER_OF_PROCESSORS%--abbreviate路径工具集= MSVC-11.0定义= _SECURE_SCL = 0 =定义_CRT_SECURE_NO_DE preCATE定义= _CRT_SECURE_NO_WARNINGS --without-MPI地址模型= 32 =变种调试安装链接=共享运行时链接=共享线程=多非同步的异常=在异常处理= ON的extern-C-抛出异常= OFF - preFIX = .. \\提振
  CD ..

b2 -j%NUMBER_OF_PROCESSORS% --abbreviate-paths toolset=msvc-11.0 define=_SECURE_SCL=0 define=_CRT_SECURE_NO_DEPRECATE define=_CRT_SECURE_NO_WARNINGS --without-mpi address-model=32 variant=debug install link=shared runtime-link=shared threading=multi asynch-exceptions=on exception-handling=on extern-c-nothrow=off --prefix=..\boost cd ..

我已经安装到计算机CYGWIN。

I have CYGWin installed to the computer.

下面是我曾尝试到现在;

Here what I have tried till now;

*我试图建立它在32位命令窗口(我用的詹金斯打造提升)
        
        

*I have tried to build it in 32 bit command window (I am using jenkins to build boost)

*我在升压配置/ user.hpp中写道的#define BOOST_ALL_DYN_LINK

*I wrote #define BOOST_ALL_DYN_LINK in the boost config/user.hpp

*我在升压配置/ user.hpp中写道的#define BOOST_ALL_NO_LIB

*I wrote #define BOOST_ALL_NO_LIB in the boost config/user.hpp

是否有任何人谁经历过这样的问题?我真的找不到任何地方在什么?

Is there anyone who experienced such a problem before? I really could not find anything in anywhere?

编辑:

有一个关于我的问题的最新情况。我能建造它发布。只有我已经改变的事情是在这里:

There is an update about my problem. I am able to build it for release. Only thing that I have changed is here:

B2 -j%NU​​MBER_OF_PROCESSORS%--abbreviate路径工具集= MSVC-11.0定义= _SECURE_SCL = 0 =定义_CRT_SECURE_NO_DE preCATE定义= _CRT_SECURE_NO_WARNINGS --without-MPI地址模型= 32 变异=释放安装链接=共享运行时链接=共享线程=多非同步的异常=在异常处理= ON的extern-C-抛出异常= OFF - preFIX = .. \\提振
CD ..

b2 -j%NUMBER_OF_PROCESSORS% --abbreviate-paths toolset=msvc-11.0 define=_SECURE_SCL=0 define=_CRT_SECURE_NO_DEPRECATE define=_CRT_SECURE_NO_WARNINGS --without-mpi address-model=32 variant=release install link=shared runtime-link=shared threading=multi asynch-exceptions=on exception-handling=on extern-c-nothrow=off --prefix=..\boost cd ..

可能是什么问题呢?我该如何解决呢?

what could be the problem? How can I solve it?

先谢谢您的任何建议。

推荐答案

其实我已经找到了解决办法:

Actually I have found the solution:

我使用的bjam的方式是正确的,足够的动态​​构建提振。在那个阶段,我不应该定义什么。编译后我改变user.hpp中和的#define BOOST_ALL_DYN_LINK。
这样一来我自己的项目(这是使用升压)会明白提升是动态的。这就是升压应该如何构建方式。

The way I am using bjam is correct and enough to build boost dynamically. In that stage, I should not define anything. After compilation I change user.hpp and #define BOOST_ALL_DYN_LINK. This way my own projects (which are using boost) will understand boost is dynamic. That is the way how boost should be built.

这似乎是最好的方式,因为升压自动去code必要的库和预期的DLL和行之有效的。

That seems the best way because boost automatically decode necessary libs and dlls as expected and works well.

这篇关于建设加速动态链接给链接错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆