Is it possible to generate a C source file (.c) from an Objective-C source file (.m), using, maybe, GCC or Clang (or another tool)?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, but you may be interested in the C++ rewriter. Given an objective-C file, let’s say:
You can get a C++ version with
which is great to see how objective-C is implemented. Most of the file will be just C.
Some of the resulting expressions are dense. You’ll need patience, C knowledge, and the Objective-C Runtime Reference. http://cdecl.org/ helps with small pieces.