Xcode怎么修改成中文

Xcode 要怎么修改成中文以及如何创建c++的头文件


[经过版主编辑]

MacBook Pro 14″, macOS 13.0

发布日期 2022年12月13日 上午6:07

回复
回复量: 7

2022年12月14日 上午1:46 回应 A荣阿


    xcode怎么调成中文方法一:使用一种语言

 

    1、打开info, 找到“Localization native development region”

    2、然后把原来的en 改成China 就行,为了防止出错, 直接点击后边的三角选择,不要自己打字

 

    xcode怎么调成中文方法二:使用多种语言:

 

    1、如果是这种情况,你就要点击+号,新加一项叫做Localizations的,然后点击小三角,在里边选择支持的语言,

    2、设置完毕。运行调试即可看到效果。

 

    另外配置项目本地化支持简体中文和英文,具体设置方法如下:

    工程-PROJECT-info->Localizations,点“+”,选择(Chinese(Simplified))添加简体中文,英文Xcode自带有(English),所以不需要再次添加,以此法也可修改拍照界面retake和use按钮。


2022年12月14日 上午2:02 回应 A荣阿

Showing All Messages

ld: 4 duplicate symbols for architecture arm64

如图:




原因:是由于重复添加了相同文件,或者重复引入了相同的头文件所导致的

解决办法:

1.搜索报错的 类名,看下是否有重复添加到项目中

2.仔细在报错的类中找下是否有重复添加 .h头文件


经过我仔细发现重复导入了头文件,删除一个就好




作者:超人_22

链接:https://www.jianshu.com/p/0a370c1e56e0

来源:简书

著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

2022年12月14日 上午1:47 回应 A荣阿

1.终端输入:echo | g++ -v -x c++ -E -




2.切换到上图划红线目录下:


cd /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include

3.新建bits文件夹:


sudo mkdir bits

4.切换到bits文件夹下,新建stdc++.h


sudo touch stdc++.h

5.vim打开stdc++.h,输入一下内容:


// C++ includes used for precompiling -*- C++ -*-

// Copyright (C) 2003-2014 Free Software Foundation, Inc.

//

// This file is part of the GNU ISO C++ Library. This library is free

// software; you can redistribute it and/or modify it under the

// terms of the GNU General Public License as published by the

// Free Software Foundation; either version 3, or (at your option)

// any later version.

// This library is distributed in the hope that it will be useful,

// but WITHOUT ANY WARRANTY; without even the implied warranty of

// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

// GNU General Public License for more details.

// Under Section 7 of GPL version 3, you are granted additional

// permissions described in the GCC Runtime Library Exception, version

// 3.1, as published by the Free Software Foundation.

// You should have received a copy of the GNU General Public License and

// a copy of the GCC Runtime Library Exception along with this program;

// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see

// <http://www.gnu.org/licenses/>.

/** @file stdc++.h

* This is an implementation file for a precompiled header.

*/

// 17.4.1.2 Headers

// C

#ifndef _GLIBCXX_NO_ASSERT

#include <cassert>

#endif

#include <cctype>

#include <cerrno>

#include <cfloat>

#include <ciso646>

#include <climits>

#include <clocale>

#include <cmath>

#include <csetjmp>

#include <csignal>

#include <cstdarg>

#include <cstddef>

#include <cstdio>

#include <cstdlib>

#include <cstring>

#include <ctime>

#if __cplusplus >= 201103L

#include <ccomplex>

#include <cfenv>

#include <cinttypes>

#include <cstdalign>

#include <cstdbool>

#include <cstdint>

#include <ctgmath>

#include <cwchar>

#include <cwctype>

#endif

// C++

#include <algorithm>

#include <bitset>

#include <complex>

#include <deque>

#include <exception>

#include <fstream>

#include <functional>

#include <iomanip>

#include <ios>

#include <iosfwd>

#include <iostream>

#include <istream>

#include <iterator>

#include <limits>

#include <list>

#include <locale>

#include <map>

#include <memory>

#include <new>

#include <numeric>

#include <ostream>

#include <queue>

#include <set>

#include <sstream>

#include <stack>

#include <stdexcept>

#include <streambuf>

#include <string>

#include <typeinfo>

#include <utility>

#include <valarray>

#include <vector>

#if __cplusplus >= 201103L

#include <array>

#include <atomic>

#include <chrono>

#include <condition_variable>

#include <forward_list>

#include <future>

#include <initializer_list>

#include <mutex>

#include <random>

#include <ratio>

#include <regex>

#include <scoped_allocator>

#include <system_error>

#include <thread>

#include <tuple>

#include <typeindex>

#include <type_traits>

#include <unordered_map>

#include <unordered_set>

#endif

————————————————

版权声明:本文为CSDN博主「chococolate」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。

原文链接:https://blog.csdn.net/weixin_44307969/article/details/117870277

这个主题已被系统或社区团队关闭。 你可以为你认为有帮助的任何帖子投票,也可以在社区中搜索其他答案。

Xcode怎么修改成中文

欢迎来到 Apple 支持社区
Apple 客户在其产品方面互相帮助的论坛。使用您的 Apple 帐户开始畅游其中吧!!