How to compile and run a program on Visual Studio 2012 for Windows 8?

I searched for the C compiler for Windows 8, and then found out that I could compile programs in Visual Studio.

Microsoft offers a walkthrough for the same, but I donโ€™t like it, because it involves writing a program to a text editor and using the command line often, I look more like a Turbo C ++ interface.

In any case, can I run and compile programs directly in Visual Studio 2012 for Windows 8 themselves?

Or, if this is not possible, what alternatives do I have for Windows 8?

+4
source share
4 answers

On the page you posted:

By default, the Visual C ++ Compiler treats all files that end in .c as source code for C, and all files that end in .cpp as source code in C ++.

Now create any type of C ++ project you want, and when you add the files, make sure that they end with .c and you are done.

+4
source

Since you asked for alternatives (it is not clear if you meant even alternative IDEs and / or compilers):

You can try the free Code :: Blocks IDE , which supports MINGW , which includes the GCC port (Gnu compiler compilations) for Windows. An alternative, and sometimes simpler to install, is the MINGW-based GCC port is the TDM-GCC . Code :: Blocks can also be configured to work with other toolchains.

The advantage of using GCC is that it is the default compiler for Linux systems, so if you also need code for Linux, you can "reuse" your knowledge of the GCC compiler that you used on Windows.

Another alternative to the IDE could be eclipse , with a CDT extension for developing C / C ++ (can be configured to work with GCC or with many other tooling purposes). Much heavier than Code :: Blocks, but with a lot more features.

+1
source

you can use visual studio like TURBO C ++

But here

if you want to compile one file

create program.c

 file->new->c++file->open 

then write the c-code and save it with the extension .c

Now you need to create a new project and file->new->project add program.c to this project.

and compile the project. Using build->compile . before this change is compiled as with

 project->properties. 
0
source

The last time I used Turbo C ++ (in the early 90s), it was an IDE, like Visual Studio.

Both Turbo C ++ and Visual Studio offer command line tools.

In the Start menu, find the Visual Studio tool menu, there should be a command line shortcut that allows you to access the command line tools (cl.exe).

If you have make files, you can use nmake, not make.

0
source

All Articles