Hi people!
Do you know if it's possible to programm c (not c++) in Visual Studio 2008? If yes then how? I haven't found any component for that.
Regards.
Hi people!
Do you know if it's possible to programm c (not c++) in Visual Studio 2008? If yes then how? I haven't found any component for that.
Regards.
You can specify any compiler you'd like in VisualStudio; therefore, if there's a specific C compiler you'd like to use, it will handle it.
As long as your source file has the .c
extension, Microsoft C++ compiler will compile in C-mode.
In addition, the /Tc<source filename>
switch can be used to force compilation of a specific file in C mode, and the /TC
switch can be used to force C mode for all files. For C++, it's /Tp
and /TP
respectively.
Just save the file with .c extension instead of .cpp and it will compile as C instead of C++. To be extra cautious, you can go to the project settings, under "Project -> Properties -> Configuration Properties -> C/C++ -> Advanced", make sure that "Compile As" says "Compile as C code (/TC)".