Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to convert a Win32 application project into a console application?

Is it possible to convert an existing visual studio project file that creates a Win32 application into a project file that creates a Win32 "Console" application? If so, how is this done? I've googled and found plenty of people doing the opposite, but none this way.

like image 698
dicroce Avatar asked Jan 05 '10 23:01

dicroce


People also ask

What is a Win32 Console Application?

Windows application A Win32 program is an executable application (EXE) written in C or C++, using calls to the Win32 API to create a graphical user interface. You cannot add MFC or ATL support to a Windows application.

How do I change the Console Application in Windows?

Right click your project in the solution explorer and select properties. Then, under the "Application" tab change the "Output type" of your project from “Console Application” to “Windows Application.” Save this answer.

How do I create a Console Application in Visual Studio 2015?

Open Visual Studio, and choose Create a new project in the Start window. In the Create a new project window, select All languages, and then choose C# from the dropdown list. Choose Windows from the All platforms list, and choose Console from the All project types list.


2 Answers

At the linker level, the distinction is made with the /SUBSYSTEM switch to the linker. However, since there is so much other stuff built up around the type of project in Visual Studio, sometimes it's easiest to create a new console mode project, and add the existing code to the new project.

like image 149
Greg Hewgill Avatar answered Sep 24 '22 08:09

Greg Hewgill


I am not aware of an automated way of that. I think you can change all the project settings to make that switch. But it would be tedious. I believe it would be simpler to just create a new project and add the source files to it.

like image 27
Mark Wilkins Avatar answered Sep 23 '22 08:09

Mark Wilkins