-1

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?

Barry Michael Doyle
  • 9,333
  • 30
  • 83
  • 143

1 Answers1

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