Luca Nate Mahler
Luca Nate Mahler

Reputation: 1332

Objective-C Code to C Code

How can I "compile" Objective-C Code to (only) C-Code?
There is a way to preprocess Objective-C in Xcode (Product -> Generate Output -> Generate Preprocessed File), but this is not what I'm looking for...

Thanks...

Upvotes: 0

Views: 209

Answers (1)

Tom van der Woerdt
Tom van der Woerdt

Reputation: 29965

clang (the compiler front-end used by Xcode nowadays) has a -rewrite-objc option built-in, which allows you to generate C++ code based on Objective-C (or Objective-C++) code.

Just don't ask me how to combine that with Xcode.

Upvotes: 3

Related Questions