xcode - Intel C++编译器,无法在OS X上打开stdarg.h

OS X 10.6.8,XCode 3.2.6,基本SDK 10.5,英特尔编译器11.1

我在尝试编译时收到一条奇怪的消息:
catastrophic error: could not open source file "stdarg.h"
我正在使用PCH,但确实找到了:Xcode Intel compiler icc cannot find #include <algorithm>

这是一个类似的问题,我认为源文件类型设置为.c.c而不是.c
从我可以看到的stdarg.h是:

/* This file is public domain.  */
/* GCC uses its own copy of this header */
#if defined(__GNUC__)
    #include_next <stdarg.h>
#elif defined(__MWERKS__)
    #include "mw_stdarg.h"
#else
    #error "This header only supports __MWERKS__."
#endif

因此,显然必须定义GNUC。

谁能帮助我找出如何更好地进行编译,因为这在GCC 4.0中无需更改即可起作用?有没有一种全局的方法可以让XCode重新评估源文件的类型而不是.c.c.cpp.cpp,我什至不知道这将如何发生。

另外,是否有#define可以检查,以查看是否需要将英特尔编译器用于特殊情况?

最佳答案

我查看了构建结果中引用的一些文件,并查看了XCode中表示source.c.c的源文件类型,我认为如果将其更改为source.c,编译器错误就会消失。

https://stackoverflow.com/questions/15982167/

相关文章:

compiler-errors - 类型提供程序的 Mono FSharpC 错误

compiler-errors - 错误: no newline at end of file [-

model - Play Framework 错误: not found: type model

android - 如何解决Java Eclipse中的 “The hierarchy of the

android - Android Studio 0.2.1错误

python - python err : Local variable referenced be

perl - "error: variable length array of non-POD el

vba - 具有多个条件的Select Case函数不循环

compiler-errors - 来自gtest-all.cc的Google测试编译错误

android - 如何解决java.lang.NoClassDefFoundError