小编Ric*_*ead的帖子

Visual Studio 2010中的boost :: thread编译错误

我在很长一段时间内第一次尝试使用boost,当我包含boost/thread.hpp标头时,我在boost本身内部出现了编译错误:

    c:\myproj\boost_1_46_0\boost\thread\win32\thread_heap_alloc.hpp(97): error C2061: syntax error : identifier 'heap_memory
    c:\myproj\boost_1_46_0\boost\thread\detail\thread.hpp(134) : see reference to function template instantiation 'T *boost::detail::heap_new<boost::detail::thread_data<F>,void(__cdecl *)(void)>(A1 &&)' being compiled
    with
    [
        T=boost::detail::thread_data<void (__cdecl *)(void)>,
        F=void (__cdecl *)(void),
        A1=void (__cdecl *)(void)
    ]`
Run Code Online (Sandbox Code Playgroud)

这只是通过包含标题,它似乎与我的代码没有任何关系,但我看不出该怎么办,有人可以帮忙吗?

c++ multithreading boost visual-studio-2010

4
推荐指数
1
解决办法
2331
查看次数

标签 统计

boost ×1

c++ ×1

multithreading ×1

visual-studio-2010 ×1