首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法解析的外部符号"void __cdecl boost::tss_cleanup_implemented(void)“

无法解析的外部符号"void __cdecl boost::tss_cleanup_implemented(void)“
EN

Stack Overflow用户
提问于 2015-11-25 20:34:25
回答 1查看 1.4K关注 0票数 2

当我试图搜索这个错误时,我非常惊讶,因为我只得到了4个结果,其中两个似乎是中文的。在编译我的项目和boost源码时,我得到了这个错误。我搜索了boost库,发现了以下内容:

代码语言:javascript
复制
namespace boost
{
    /*
    This file is a "null" implementation of tss cleanup; it's
    purpose is to to eliminate link errors in cases
    where it is known that tss cleanup is not needed.
    */

    void tss_cleanup_implemented(void)
    {
        /*
        This function's sole purpose is to cause a link error in cases where
        automatic tss cleanup is not implemented by Boost.Threads as a
        reminder that user code is responsible for calling the necessary
        functions at the appropriate times (and for implementing an a
        tss_cleanup_implemented() function to eliminate the linker's
        missing symbol error).

        If Boost.Threads later implements automatic tss cleanup in cases
        where it currently doesn't (which is the plan), the duplicate
        symbol error will warn the user that their custom solution is no
        longer needed and can be removed.
        */
    }

}

我的问题是什么是tss清理,为什么需要它,以及我如何实现它。

EN

回答 1

Stack Overflow用户

发布于 2020-01-04 22:09:44

我不知道TSS,但是要修复这个链接器错误,您需要定义

代码语言:javascript
复制
BOOST_THREAD_WIN32

代码语言:javascript
复制
BOOST_THREAD_BUILD_LIB

所以boost/thread/src/win32/tss_pe.cpp实现了缺失的函数(empty)。

我假设这个问题在Internet上几乎没有结果,因为构建场景很少见。大多数人不会在自己的项目中构建boost,而是使用b2构建boost。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33916672

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档