Solved

C in Visual Studio 2013

Posted on 2014-07-24
7
765 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 33

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

895 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now