我想在我的ios應用程序中使用C++代碼(我真的不喜歡目標C,我只在必要時才使用它[視圖控件,等等),而一切似乎正在工作,我在下面的測試文件中得到一個錯誤。如何在xcode 4.3中包含C++標準庫
#ifndef prueba3_GlobalStatic_h
#define prueba3_GlobalStatic_h
#include <string>
using namespace std;
class GlobalStatic
{
public:
GlobalStatic();
~GlobalStatic();
string foo();
private:
int integerValue;
};
#endif
當我嘗試構建項目的IDE給我以下錯誤: 我環顧四周,但不能找到令人信服的答案 「未找到‘字符串’文件」;任何幫助,將不勝感激。實質上,我如何獲得標準庫的工作?
你是如何編寫代碼的?你能看到IDE使用的命令行嗎? – 2012-07-11 15:44:59
文件.mm的擴展名是? – 2012-07-11 15:53:17
請注意,不是更改文件擴展名,您可以進入「獲取信息」並更改文件類型。 – 2012-07-11 16:03:54