Newbie: Creating a C Project in Visual Studio

  • Thread starter Thread starter Guest
  • Start date Start date
Is it possible to create a C project within Visual Studio 2005?

There is no project wizard for C projects in Visual C++ 2005, but you can
modify a C++ project.

The Visual C++ compiler has an optoin /TC -> compile as C code. In the
project settings, you can find this under
Configuation Properties->C/C++->Advanced->Compile As

Marcus
 
Is it possible to create a C project within Visual Studio 2005?

Yes. this is very easy.
you can do 2 things:
create an empty win32 project and add *.c files.
or create a win32 project, and rename the cpp files to c files.

--

Kind regards,
Bruno.
(e-mail address removed)
Remove only "_nos_pam"
 
Is it possible to create a C project within Visual Studio 2005?
There is no project wizard for C projects in Visual C++ 2005, but you can
modify a C++ project.

The Visual C++ compiler has an optoin /TC -> compile as C code. In the
project settings, you can find this under
Configuation Properties->C/C++->Advanced->Compile As

In case of the OP, if he is creating a new project, I think the better
option is to rename the few files that are create for a new project, instead
of using the compiler switch.

That way it is immediately obvious if files contain C or C++ code. (What You
See Is What You Get)
It also makes it a little bit easier if code has to be ported to another
platform.

Of course, if he has to re-use cpp files with C code in them, the cwitch
could be better because he would not have to modify the files. this could be
important if they have to remain compatible with another build system for
example.

--

Kind regards,
Bruno.
(e-mail address removed)
Remove only "_nos_pam"
 
Back
Top