lundi 24 juin 2019

How can I use the Visual Studio C/C++ Compiler (cl.exe) to pre-process my objective-C code?

I have some old Objective-C code which I am trying to compile using my custom-build framework. This build framework preprocesses the source files, then compiles them to C-Source code and then uses Cl.exe to do the rest of compiling.

However, when I try to do the same with VS2015, it fails in my preprocessing phase. As from VS2015 VCRuntime.h is included in all files indirectly and uses newer C++ features e.g. Variadic Macros. So my preprocessor fails.

So, is there a way to use the Cl.exe to preprocess my source code e.g. unwinding #includes, evaluating #defines etc without being concerned about the actual code? I tried cl.exe /Tp but didn't work. However this option does understand #imports

Aucun commentaire:

Enregistrer un commentaire