- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我知道 libobjc2 的存在,并且我了解到我需要使用 clang 而不是 GCC,但是我找不到关于编译过程有何不同的任何基本说明。
谁能提供明确的分步说明,以获取、配置、编译和使用 GNUstep 与 Ubuntu 中的 Objective-C 2.0?
最佳答案
自 GNUStep ObjC2 FAQ已经被引用了,我假设你已经看过了。不过,我想指出这一点:
For more advanced features, currently only supported if you compile with Clang, you will need the GNUstep runtime. This is not currently considered production ready. It should work as a drop-in replacement for the GCC runtime, but some of the advanced features are not well-tested.
The FAQ还调用了以下内容:
If you are using a recent version of GCC to compile your code then you should have a copy of the Objective-C runtime library that came with your compiler.
If you compile with the -fobjc-nonfragile-abi flag then you will use the new ABI. This is only supported with the GNUstep runtime. This adds:
- Property introspection
- Introspection on optional protocol methods
- Non-fragile instance variables
- Forwarding proxy support
因此,如果您正在通过 GCC 寻找旧功能,this tutorial会很好地完成这项工作,this one.您已明确指出您希望使用 Clang 提供的功能(通过 libobjc2)来执行此操作,Clang 有自己的文档库。
Obtaining a release of Clang and getting set up似乎相当切割和干燥。 LLVM Getting Started document 非常健壮(完整的文档存档 here ),它应该提供有关正确设置和编译后端的见解。可以找到对预期构建过程的一些额外见解 here .
但是,在撰写本文时,在 Clang 中编译 Objective-C 应用程序的文档和测试似乎非常少。随着功能的推出和代码库的稳定,我想会有更多的用户文档上线。
关于objective-c - 如何将 Obj-C 2.0 与 GNUstep 一起使用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4150675/
我是一名优秀的程序员,十分优秀!