- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
代码是
#include <stdio.h>
int
main () {
printf("Defined\n");
}
简单的代码是用
编译的gcc test.c -o test
or
clang test.c -o test
它抛出...
In file included from test.c:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/usr/include/stdio.h:64:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/usr/include/_stdio.h:68:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/usr/include/sys/cdefs.h:784:2: error: Unsupported architecture
#error Unsupported architecture
^
In file included from test.c:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/usr/include/stdio.h:64:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/usr/include/_stdio.h:71:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/usr/include/_types.h:27:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/usr/include/sys/_types.h:33:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/usr/include/machine/_types.h:34:2: error: architecture not supported
#error architecture not supported
^
In file included from test.c:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/usr/include/stdio.h:64:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/usr/include/_stdio.h:71:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/usr/include/_types.h:27:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'; did
you mean '__int128_t'?
typedef __int64_t __darwin_blkcnt_t; /* total blocks */
^
note: '__int128_t' declared here
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'; did
you mean '__int128_t'?
typedef __int32_t __darwin_blksize_t; /* preferred block size */
^
note: '__int128_t' declared here
还有更多类似的错误。
当然编译器之前可以正常工作,但是在我将 mac os 更新到 10.14.5 (18F132) 之后,它发生了。看起来编译器设置有一些问题,但我不知道从哪里开始。
我的 clang 版本是
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
最佳答案
谢谢@robthebloke,
我重新安装了与 xcode 相关的所有内容,但它不起作用。我重新启动了 mac,以便重置环境变量并且它确实有效!
看起来我不小心触及了环境变量,但我无法确定到底是哪一个导致了问题。
仅供引用:我通常将一堆 c 代码编译到几个平台:mac os、android 和 ios。我想我的交叉编译脚本与更新的操作系统或编译器有问题(?)。
正如@Clifford 所说,printenv | grep iPhoneOS
可能会发现问题。
关于c - 无法使用 mac os 不支持的体系结构编译简单的 c 代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57050529/
这个问题在这里已经有了答案: What is an undefined reference/unresolved external symbol error and how do I fix it?
我遇到了这两个文档(它们是用意大利语写的,尽管代码注释是英文的): http://home.deib.polimi.it/brandole/acsocr/L13%20-%20Generic%20Ass
我的主要目标是提供一个用 jquery 编写的基于 solr 的搜索应用程序。 (不熟悉solr的,就假设它是一个可以返回搜索结果的rest api。)为了这个目标,我编写了许多小型应用程序和 ser
这个问题是关于选择“正确”类型的NoSQL数据库的,我希望甚至可以根据我将在下面列出的一些需求/用例以及当前正在使用的传统RDBMS解决方案,讨论特定的数据库以及它们为什么适用。地点。时间长了一点,但
在 Java 中我运行: System.out.println(Math.log(249.0/251.0)); Output: -0.008000042667076265 在 C# 中我运行:<- 已
我目前正在考虑通过 Redux 将 Context 实现到我们的一个应用程序中,但是,我似乎找不到任何关于什么是大型应用程序的最佳结构的信息? Redux 有一个定义的方法来创建 reducer、ac
我正在使用 mailcore 框架,但收到错误消息“archtecture x86 的重复符号”以及“找不到选项的目录” 下面是错误日志。 Ld /Users/user/Library/Develop
关闭。这个问题是opinion-based .它目前不接受答案。 想改进这个问题?更新问题,以便 editing this post 可以用事实和引用来回答它. 11 个月前关闭。 Improve t
假设我正在从 C++ 移植代码并需要在 C# 中模拟相同的位移技术: 每当我执行位移时,我是否必须考虑架构的 Endain-ness? 最佳答案 没有。位移是一种纯粹的代数运算。它不比乘以二更依赖于平
关闭。这个问题需要debugging details .它目前不接受答案。 编辑问题以包含 desired behavior, a specific problem or error, and th
关于架构 XXX 的重复符号有很多问题,但我没有得到我的问题的答案。在我的场景中,我使用 Cocoapod,并导入 FMDB,但是当我集成另一个第三方 SDK 时,当我构建项目时,出现如下错误: 是否
我无法编译我的 Xcode 项目,它有重复的 ParseFacebookUtilsV4 问题 这是我的苹果 Mach-O 链接器错误: duplicate symbol _llvm.cmdline i
我对使用 MFC 的内置文档 View 体系结构的必要性有疑问。我得到了一个基于对话框的旧项目,我必须在其中用框架替换主对话框并添加功能区。它有一种文档 View 架构,创建时没有内置类,我更愿意在新
我正在构建一个协作创作工具,该工具允许用户共同编辑信息空间,该信息空间是节点和链接的可视化。一个客户端应用程序中所做的更改需要反映到所有其他客户端中。由于它是可视化的,因此可能需要经常更新潜在的大数据
如果我在 Windows(x86 和 x64)下的 .NET 上运行涉及 System.Double 的复杂计算,然后在 Mono(Linux、Unix 等)上运行,绝对有保证 以在所有情况下得到完全
当我使用 Xcode 4.6 编译我的 iPhone 应用程序时,我看到一个奇怪的错误代码: "duplicate symbols for architecture i386". 我知道这个关于文件名
我最近询问了 System.Double,并被告知计算可能因平台/架构而异。不幸的是,我找不到任何信息来告诉我这是否适用于 System.Decimal。 对于任何特定的 decimal 计算,无论平
我有一些实体,例如:Customers、Orders、Invoices。 对于它们中的每一个,我都将它们的CRUD 操作 和一些其他界面分组为:ISvcCustomerMgmt、ISvcOrderMg
这个问题有点像一个池。我们正在尝试在使用 LINQ to SQL 之类的 ORM 时确定最佳架构。我们正在定义的架构是用于其他应用程序将通过直接引用 DLL 或通过 Web 服务访问的框架。我们有 .
请就如何为 Java web 应用程序做“插件”架构提出建议。 目前我们在 Tomcat servlet 容器中使用非常简单和标准的 Spring+Hibernate+Struts 2。 (使用 ma
我是一名优秀的程序员,十分优秀!