开发者

Objective-C and C interoperability

开发者 https://www.devze.com 2022-12-09 11:55 出处:网络
We\'re going to have to write a C library and this library has to be accessible from Objective-C. Now I don\'t know anything about Objective-C so I wonder how simple Objective-C <-> C interoperabil

We're going to have to write a C library and this library has to be accessible from Objective-C. Now I don't know anything about Objective-C so I wonder how simple Objective-C <-> C interoperability is. Is that as simple as including the 开发者_运维技巧C header in the Objective-C code and linking to the library? Is there anything special I'm supposed to do (like the extern "C" bit with C++)?


Objective-C is a strict superset of C. You don't need to use extern "C" or anything like that.


Objective-C is a strict superset of GNU C (note, this is not the same as ISO C90).

0

精彩评论

暂无评论...
验证码 换一张
取 消