0

Has anyone any idea why the resulting exe from a build comes with a console?

I've built an EXE and it shows up with the window it should (the right one), and a console window (the left one - obviously).

alt text http://img216.imageshack.us/img216/570/strangep.jpg

This behaviour is the same for the debug - exe and the release - exe.

When I start it from Eclipse the console window does not show up.

(Eclipse Galileo / MinGW / C)

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
Marcus Tik
  • 1,709
  • 6
  • 20
  • 30

2 Answers2

3

Find the linker settings, and add the -mwindows switch.

eduffy
  • 39,140
  • 13
  • 95
  • 92
-2

you might look into this here surely answers why Eclipse is not opening your console window

There seems to be no way to get a java.io.Console object when running an application through Eclipse. A command-line console window is not opened with the application, as it is run as a background process (background to Eclipse?). Currently, there is no Eclipse plugin to handle this issue, mainly due to the fact that java.io.Console is a final class.

All you can really do is test the returned Console object for null and proceed from there.

as far as your console window popping is concerned, you might be using System.console in the application

Hope this Helps

Community
  • 1
  • 1
81967
  • 115
  • 2
  • 9