0
升级到XCode 4.4.1并重新启动我的机器,重新编译,现在得到下面的错误,当我尝试编译 - 任何建议? (它用来编译罚款) (运行在Lion上10.7.4,XCode的版本4.4.1)XCode升级到4.4.1,现在我收到编译错误的错误<vector>
#ifndef MYFILE_H
#define MYFILE_H
#include <vector> <-- this line
#include <typeinfo>
#include <string>
#include "assert.h"
using namespace std;
错误消息
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/usr/include/c++/4.2.1/vector:69:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/usr/include/c++/4.2.1/bits/stl_vector.h:69:1: error: expected member name or ';' after declaration specifiers
_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
您的文件是.h文件? Xcode可能会尝试将它编译为C而不是C++ – Geoffroy
我不这么认为 - 它包含在一个.cpp文件中 – daven11
您确定它是唯一的包含/导入吗?这是我目前看到的唯一原因:/ – Geoffroy