Solved

C in Visual Studio 2013

Posted on 2014-07-24
7
796 Views
Last Modified: 2014-07-25
Is it possible to develop a C application using Visual Studio 2013?  If so;  what are the exact steps?

Thanks
0
Comment
Question by:Ray Turner
7 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 167 total points
ID: 40216979
Apparently you can.  Here is a link to Microsoft with a tutorial on how to do it.


Walkthrough: Compiling a C Program on the Command Line
http://msdn.microsoft.com/en-us/library/bb384838.aspx

mlmcc
0
 
LVL 31

Assisted Solution

by:Zoppo
Zoppo earned 167 total points
ID: 40217044
Hi kaufmed,

you can use the IDE too, just create an 'empty project' and add a '.c' file (via context-menu in Solution Explorer) which contains a main function.

ZOPPO
0
 
LVL 31

Expert Comment

by:Zoppo
ID: 40217084
Argh!!! Sorry, mea culpa ...

(to be honest while I typed it a little part of my brain thought 'astounding that kaufmed doesn't know this' :o/ )
0
 
LVL 34

Assisted Solution

by:sarabande
sarabande earned 166 total points
ID: 40218804
to add to above comments :-)

if adding a source with .c (small letter c) extension to a visual c++ project, the compiler used defaults to the ansi c compiler. that wouldn't be the case if you renamed a .cpp file to .c later. if you don't want to rely on the defaults only you can right-click on the source file in the solution tree (project tree), choose 'Properties' and go to Configuration Properties -C++  Advanced page. here you can chose the compiler in 'Compile As' regardless of the file extension.

note, ansi c is very strict. for example you are not allowed to add new variables in the middle of a code block. as c is a subset of c++ you may find it convenient to use the c++ compiler for your c sources. that might require to using the extern "C"  clause to use for some declarations what could be a little bit tricky. but normally it worth the efforts.

Sara
0
 

Author Closing Comment

by:Ray Turner
ID: 40220882
Thanks!!!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The following diagram presents a diamond class hierarchy: As depicted, diamond inheritance denotes when two classes (e.g., CDerived1 and CDerived2), separately extending a common base class (e.g., CBase), are sub classed simultaneously by a fourt…
Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question