Solved

C in Visual Studio 2013

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

809 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