我有一台旧计算机无法升级到Lion,但我想用它进行编码,同时仍然利用语法instancetype和Objective-C文字.有没有人试图编译一个较新的Clang和LLVM用于较旧的Xcode并成功?
每当我尝试在 Mac 上的 Xcode 上构建代码时,都会收到以下错误。
我当前的系统:
macOS:版本 10.15.1 (19B88)
Xcode:版本 11.2.1 (11B500)
我的错误:
'path'不可用:macOS 10.15中引入
'current_path'不可用:macOS 10.15中引入
'operator/'不可用:macOS 10.15中引入
'path'不可用:macOS 10.15中引入
'path'不可用:macOS中引入10.15
主程序
#include <iostream>
#include <iomanip>
#include <fstream>
#include <string>
#include <filesystem>
using namespace std;
int main(int argc, char* argv[])
{
cout << "being exectued from:" << endl;
cout << argv[0] << endl;
std::__fs::filesystem::path cwd = std::__fs::filesystem::current_path() / "filename.txt"; // C++17
cout << "but the input.txt and output.txt files should be be in the following directory:" << endl;
cout …Run Code Online (Sandbox Code Playgroud)