Solved

C in Visual Studio 2013

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

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 30

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 32

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

In Easy String Encryption Using CryptoAPI in C++ (http://www.experts-exchange.com/viewArticle.jsp?aid=1193) I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

707 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

15 Experts available now in Live!

Get 1:1 Help Now