Newbie: Creating a C Project in Visual Studio

M

Marcus Heege

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
 
G

Guest

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"
 
G

Guest

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"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top