编译boost时出错
error compiling boost
我正在尝试使用Visual Studio 2008和STLPort 5.2.1为x86 Windows CE编译Boost 1.47。我可以成功地编译x86 Windows和ARMV4I Windows Mobile 6.5。
当我运行bjam时,我在大多数每个模块中都会遇到这个错误:
stlportctype.h(42) : fatal error C1083: Cannot open include file: '../1/ctype.h': No such file or directory
错误在STLPort的ctype.h中所指的代码行是:
#include _STLP_NATIVE_C_HEADER(ctype.h)
如果我创建一个新的Visual Studio项目并添加行:
#define STR1(x) #x
#define STRINGIZE(x) STR1(x)
#pragma message (STRINGIZE(_STLP_NATIVE_C_HEADER(ctype.h)))
我看到了:正如我所期望的<../X86/ctype.h>
。
为什么boost用"1"代替"X86"?在为ARMV4I Windows Mobile或x86 Windows进行编译时,它没有这个问题。
编辑
更多信息。有人故意在"X86"上进行字符串替换。
在stlport\sll\config_evc.h中,我将pragma message
添加到该代码中:
# if !defined (_STLP_NATIVE_INCLUDE_PATH)
# if defined (_X86_)
# if defined (_STLP_WCE_TARGET_PROC_SUBTYPE_EMULATOR)
# define _STLP_NATIVE_INCLUDE_PATH ../Emulator
# else
# define _STLP_NATIVE_INCLUDE_PATH ../X86
# pragma message (STRINGIZE(../abcdefg))
# pragma message (STRINGIZE(../X86))
# pragma message (STRINGIZE(_STLP_NATIVE_INCLUDE_PATH))
# endif
输出为:
../abcdefg
../1
../1
您已经定义了X86
宏(通过前面包含的一个标头,或从命令行(,并将其设置为1
,因此它会像宏一样进行扩展。#undef X86
会去掉它。
相关文章:
- 在成员dynamic_bitset上使用 boost::from_block_range 时出错,但在本地dynamic
- 执行时使用 boost::asio::d eadline_timer 时出错
- 使用boost库(cpp_int)时获取常量时出错
- 断开连接后重新连接boost beast(asio)websocket和http连接时出错
- 将 boost 与 Visual Studio 和 vcpkg 链接时出错
- Boost FFT示例-编译时出错,这段代码在做什么
- Python 3.6 的 boost 和 dlib 安装期间出错
- 在 boost::heap::p riority_queue 中推送结构对象时出错
- 编译在 Python 代码内部调用的 C++ 代码时出错,使用 Boost Python
- 使用 boost::bind 进行订阅回调时出错
- 将 std::bind 应用于带有参数 <boost::asio::ip::tcp::socket> 时出错?
- ctime 包含 boost::文件系统时出错
- 构建 boost 1.61 iostream 时出错 - 使用 -fPIC 重新编译
- 将 CLANG 构建的可执行文件与 G++-v6 构建的 Boost 库链接时出错
- 导入 Boost Python 模块 (function_impl_base9max_arityEv) 时出错
- 使用由 Mingw 5.3 编译的 boost ASIO 库使用 QT 时出错
- Boost Python:在函数中通过引用传递变量时出错
- 编译用于创建boost.log格式的代码时出错
- 在 Cygwin 64 上包含 boost.asio 时出错
- 浮点数学出错使用来自 boost::multiprecision 的cpp_bin_float