简体   繁体   English

错误编译提升

[英]error compiling boost

I am trying to compile Boost 1.47 for x86 Windows CE using Visual Studio 2008 and STLPort 5.2.1. 我正在尝试使用Visual Studio 2008和STLPort 5.2.1为x86 Windows CE编译Boost 1.47。 I can successfully compile for x86 Windows and ARMV4I Windows Mobile 6.5. 我可以成功编译x86 Windows和ARMV4I Windows Mobile 6.5。

When I run bjam, I get this error in most every module: 当我运行bjam时,我在大多数模块中都会遇到此错误:

stlport\ctype.h(42) : fatal error C1083: Cannot open include file: '../1/ctype.h': No such file or directory

That line of code the error refers to in STLPort's ctype.h is: 错误在STLPort的ctype.h中引用的那行代码是:

#include _STLP_NATIVE_C_HEADER(ctype.h)

If I create a new Visual Studio project and add the lines: 如果我创建一个新的Visual Studio项目并添加行:

#define STR1(x) #x
#define STRINGIZE(x) STR1(x)
#pragma message (STRINGIZE(_STLP_NATIVE_C_HEADER(ctype.h)))

I see: <../X86/ctype.h> as I would expect. 我看到: <../X86/ctype.h>正如我所料。

Why is boost replacing "X86" with "1"? 为什么用“1”替换“X86”? It does not have this issue when compiling for ARMV4I Windows Mobile or x86 Windows. 编译ARMV4I Windows Mobile或x86 Windows时没有此问题。

Edit 编辑

More information. 更多信息。 Something is very deliberately doing a string replace on "X86". 有些东西非常故意在“X86”上进行字符串替换。

In stlport\\stl\\config_evc.h I added the pragma message s to this code: 在stlport \\ stl \\ 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

The output is: 输出是:

../abcdefg
../1
../1

You have X86 macro defined (either by one of the earlier-included headers, or from a command line) and set to 1 , so it gets expanded, like macros tend to do. 您已经定义了X86宏(通过其中一个较早包含的标头,或者从命令行)并设置为1 ,因此它会像宏一样被扩展。 #undef X86 will get rid of it. #undef X86将摆脱它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM