1.11M Members

Compiling C in Visual Studio.NET

 
-2
 

Hello --

1. Can you compile C code in Visual Studio.NET ?
If so, can you please submit the proper steps in order to do this.

Thank You

:)

 
0
 

Yes, you can. Go to Project and Properties, then somewhere in the myriad of options you'll see "Compile as C++" where you can change it to "Compile as C". And while you're at it, change the source file extension to .c instead of .cpp.

 
0
 

Narue--

Thank you very very much for answering my post!

:)

 
0
 

Where do I find the Project and Properties tab/menu? I used to wrote C in Unix before, but now I don't have access to Unix computer anymore. Do we do the compiling using the "Start Debugging" menu? Tq.

Yes, you can. Go to Project and Properties, then somewhere in the myriad of options you'll see "Compile as C++" where you can change it to "Compile as C". And while you're at it, change the source file extension to .c instead of .cpp.

Question Answered as of 6 Years Ago by Narue and chayy_anne
 
0
 

>Where do I find the Project and Properties tab/menu?
On the main menu is a menu item called "Project". Under that is another menu item called "<your project name> Properties".

>Do we do the compiling using the "Start Debugging" menu?
I don't waste my time with the menus. I use Ctrl+F7 to compile, Ctrl+F5 to run in the debugger, and F5 to run outside of the debugger.

 
-1
 

Where do I find the Project and Properties tab/menu? I used to wrote C in Unix before, but now I don't have access to Unix computer anymore. Do we do the compiling using the "Start Debugging" menu? Tq.

Go to View Menu select Solution Explorer or CTRL+ ALT +L

Then Select The project that your are developing and right click on that.

Then select the Properties from the submenu.

Then select the Configuration properties from the Tree structure. under that select C/C++ then select Advanced. Now in the right side pane change the property
Compile As from Compile as C++ Code (/TP) to Compile as C Code (/TC)

Finally change your file extensions to .c

Now you configured you Visual Studio to compile C programs

 
-1
 

#include <iostream>
using namespace std;
int main()
{
cout<<"Hello World21"<<endl;
return 0;
}

You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article