【问题标题】:Boost 1.58.0 windows process.h errorBoost 1.58.0 windows process.h 错误
【发布时间】:2018-04-10 15:07:43
【问题描述】:

我正在尝试移植我的应用程序以使用来自 1.53.0 的 boost 1.58.0 在 windows 中编译时出现此错误

\include\boost/interprocess/detail/os_thread_functions.hpp(495): error C3861: '_beginthreadex': identifier not found

os_thread_functions.hpp 包括 <process.h>,但我的应用程序还有一个名为 process.h 的头文件。

我猜 os_thread_functions.hpp 包含我的应用程序的 process.h 而不是 Window 的标题,因此会出现错误。

如何强制 os_thread_functions.hpp 包含 VS 头文件中的 process.h

提前致谢

【问题讨论】:

    标签: c++ visual-studio boost beginthreadex


    【解决方案1】:

    os_thread_functions.hpp 包括但我的应用程序还有一个名为 process.h 的头文件。

    只要包含路径管理良好,这应该不是问题。

    尤其应该

    • 不要将“当前”目录添加到包含路径(隐式搜索当前目录)
    • 将您的标头包含为"process.h",而不是<process.h>

    这归结为#include &lt;&gt; 用于“系统”或“第三方”包括位置。见What is the difference between #include <filename> and #include "filename"?

    【讨论】:

      猜你喜欢
      • 2016-05-02
      • 1970-01-01
      • 1970-01-01
      • 2015-10-12
      • 1970-01-01
      • 2017-05-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多