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++)?
views:
104answers:
2
+11
A:
Objective-C is a strict superset of C. You don't need to use extern "C"
or anything like that.
Mehrdad Afshari
2009-10-19 21:06:17
We wrote almost the exact sentence but you beat me. :)
BobbyShaftoe
2009-10-19 21:08:16
+5
A:
Objective-C is a strict superset of GNU C (note, this is not the same as ISO C90).
BobbyShaftoe
2009-10-19 21:06:36
Using the `gcc` compiler, it's a strict superset of whatever standard happens to be in effect (via `-std=...`). Though it should be noted that there is no official `Objective-C Standard`, so it's really what ever the compiler you're using happens to compile. :)
johne
2009-10-21 06:12:10