A related question: How to start the MSVC preprocessor and compiler in two different steps?
I explicitly pre-process a MyFile.cpp (not compiling) to MyFile.i . I want to “compile” this file later (obviously skipping the preprocessing would be nice, but as the related question indicates, it seems that this is not possible with MSVS).
PROBLEM: MyFile.i is an "unrecognized extension", and cl.exe assumes that it is an "object file", which results in "no operation". (See Microsoft Warning: http://msdn.microsoft.com/en-us/library/zfsbakc5(v=VS.90).aspx , this warning is active for MSVS 2005, 2008, 2010).
I cannot find a switch to indicate that it is a "source file" (and not an object file). A related question explicitly used the convention " MyFile_preprocessed.cpp ", but I really would rather stay with the (more universal) convention MyFile.i .
QUESTION: Is there a flag where I can compile MyFile.i with MSVS?
source share