Compiling a strict-C application in MS VC++ 6.0

Started by
2 comments, last by Kippesoep 18 years, 9 months ago
Compiling a C program still results in a .cpp extension. Is there a way to compile to a .c extension?
Advertisement
If you give a file a .c extension it will be compiled as a C language file. Furthermore, in the file properties, under the C/C++ -> Advanced item, you can force "Compile as C Code" (equivalent to /TC on the command line).
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Where do I find the first "file properties" step? I don't see that under File, for instance. Under languages, it has C/C++ selected, though, but still compiling with a .cpp file.
Quote:Original post by dxFoo
Where do I find the first "file properties" step? I don't see that under File, for instance. Under languages, it has C/C++ selected, though, but still compiling with a .cpp file.


As you can find all properties in Windows: right-click. In this case, right-click on the file name in MSVC's project treeview.
Kippesoep

This topic is closed to new replies.

Advertisement