C++ Mac OS X Yosemite无标准文件

C++ Mac OS X Yosemite无标准文件,c++,c,macos,compilation,C++,C,Macos,Compilation,据我所知,XCode安装正常且成功。但是,没有/usr/include/stdarg.h,但是有/usr/include/c++/4.2.1/tr1/stdarg.h 当我尝试制作文件时,我得到 cannot find include file "stdarg.h" not in ./stdarg.h not in /usr/include/stdarg.h 此外,我认为我已正确安装了Xcode的命令行工具: xcode-select -p /Applications/Xcode.app/Co

据我所知,XCode安装正常且成功。但是,没有/usr/include/stdarg.h,但是有/usr/include/c++/4.2.1/tr1/stdarg.h

当我尝试制作文件时,我得到

cannot find include file "stdarg.h"
not in ./stdarg.h
not in /usr/include/stdarg.h
此外,我认为我已正确安装了Xcode的命令行工具:

xcode-select -p
/Applications/Xcode.app/Contents/Developer

有人遇到过同样的问题吗?

我知道这听起来很愚蠢,但文件可能位于
/Applications/Xcode.app/Contents/Developer/toolschains/Xcode default.xctoolschain/usr/lib/clang/6.1.0/include/
中。不要忘记使用尖括号(即,
#include
,而不是
#include“stdarg.h”
),如果这不起作用,请尝试将XCode的include目录添加到include路径中。您试图在这里构建什么?它看起来像是在尝试自己搜索头文件(即,不使用编译器)。这很奇怪,不推荐使用。我知道这听起来很愚蠢,但文件可能位于
/Applications/Xcode.app/Contents/Developer/toolschains/Xcode default.xctoolschain/usr/lib/clang/6.1.0/include/
中。不要忘记使用尖括号(即,
#include
,而不是
#include“stdarg.h”
),如果这不起作用,请尝试将XCode的include目录添加到include路径中。您试图在这里构建什么?它看起来像是在尝试自己搜索头文件(即,不使用编译器)。这很奇怪,不推荐使用。