解析的外部符号的boost ::时辰:: SYSTEM_CLOCK ::现在(无效) [英] Unresolved external symbol boost::chrono::system_clock::now(void)

查看:288
本文介绍了解析的外部符号的boost ::时辰:: SYSTEM_CLOCK ::现在(无效)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谷歌一直不厚道......

google has been unkind...

最近,我拉下提升1.50,我试图用它来建立我的项目。这是一个大的项目,使用几个升压功能(线程,​​信号,指针类,精神等)。一些细节:
结果 - MSVC 9.0(2008年)
结果 - 静态链接升压

I recently pulled down boost 1.50, and am trying to build my project using it. It's a large project, using several boost features (threads, signals, pointer classes, spirit, etc.). Some specifics:
- MSVC 9.0 (2008)
- Static linking boost

我得到一个错误每次产生的EXE链接,但时辰,这我不会直接链接。该错误是:

I'm getting an error linking every resulting exe, but with chrono, which I'm not directly linking. The error is:

libboost_thread-vc90-mt-sgd-1_50.lib(thread.obj) : error LNK2019: unresolved external symbol "public: static class boost::chrono::time_point<class boost::chrono::system_clock,class boost::chrono::duration<__int64,class boost::ratio<1,10000000> > > __cdecl boost::chrono::system_clock::now(void)" (?now@system_clock@chrono@boost@@SA?AV?$time_point@Vsystem_clock@chrono@boost@@V?$duration@_JV?$ratio@$00$0JIJGIA@@boost@@@23@@23@XZ) referenced in function "public: bool __thiscall boost::thread::try_join_until(class boost::chrono::time_point<class boost::chrono::system_clock,class boost::chrono::duration<__int64,class boost::ratio<1,1000000000> > > const &)" (?try_join_until@thread@boost@@QAE_NABV?$time_point@Vsystem_clock@chrono@boost@@V?$duration@_JV?$ratio@$00$0DLJKMKAA@@boost@@@23@@chrono@2@@Z)

我看了<一个href=\"http://stackoverflow.com/questions/11575660/undefined-reference-to-boostchronosystem-clocknow-boost-and-cpp-net\">this问题,但我不直接控制连接(而不是使用自动连接功能)的顺序。如果有我缺少一个具体的lib,我可以手动将其链接;次最佳的,但可能的。不过,我不知道是缺什么。看来(我半教育的看法),该符号在计时LIB externed,而不是在系统库。

I saw this question, but I'm not directly controlling the order of linking (rather using the auto-link capabilities). If there's a specific lib I'm missing, I can manually link it; sub-optimal, but possible. However, I have no idea what's missing. It appears (to my semi-educated view) that the symbol is externed in the chrono lib, and not in the system lib.

任何帮助吗?

推荐答案

有一个看的文档。它指定你要链接到计时和系统,除非你给一些特定的宏来禁止其使用​​(而失去功能)来使用线程。

Have a look at the documentation. It specifies that you have to link to chrono and system to use thread unless you give some specific macros to disable their use (and lose their functionality).

这篇关于解析的外部符号的boost ::时辰:: SYSTEM_CLOCK ::现在(无效)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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