未解决的外部符号boost :: chrono :: system_clock :: now(void) [英] Unresolved external symbol boost::chrono::system_clock::now(void)

查看:337
本文介绍了未解决的外部符号boost :: chrono :: system_clock :: now(void)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

google一直不受欢迎...

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)

我看到此问题,但我不是直接控制链接的顺序(而是使用自动链接功能)。如果有一个特定的lib我缺少,我可以手动链接它;次优,但可能。但是,我不知道缺少什么。

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.

任何帮助?

推荐答案

请查看文档。它指定你必须链接到chrono和系统使用线程,除非你给一些特定的宏禁用其使用(并失去其功能)。

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 :: chrono :: system_clock :: now(void)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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