I think in my recent project I accidentally had one cpp
file set up as a Windows application and the other cpp
file as a console file. No matter what I did I ended up with weird errors saying I needed a WinMain()
function, or that a WinMain()
function was causing half-a-dozen errors. Does anybody know of a way to switch a Windows Application file's settings to a console application?
Asked
Active
Viewed 102 times
-1

Barry Michael Doyle
- 9,333
- 30
- 83
- 143
-
http://stackoverflow.com/questions/3884124/convert-a-console-app-to-a-windows-app – Nikita Smirnov Feb 22 '17 at 14:16
-
@GoverNator That answer is for Visual Studio. – Steeve Feb 22 '17 at 14:20
-
`project options -> general`, change the type – apple apple Feb 22 '17 at 14:29
-
It should be project file, a cpp file will not contain any project settings, nor will it know it is GUI or console application. – apple apple Feb 22 '17 at 14:31
-
Removed tag from title and improved formatting – Barry Michael Doyle Feb 25 '17 at 15:19
1 Answers
0
You need to specify the subsystem for your linker via the switch /SUBSYSTEM:CONSOLE . When doing so no WinMain() will expected any more. You should do this in the used makefile which was written / created by Dev C++.

KimKulling
- 2,654
- 1
- 15
- 26