www.digitalmars.com         C & C++   DMDScript  

c++.windows.32-bits - My WIN32 GUI app always gets a console window

reply Edward Yang <neo_in_matrix msn.com> writes:
I am completely new to Digital Mars C/C++ compiler. I am using Relo (a 
free C/C++ IDE) and DMC. It's great.

However I find that every WIN32 GUI application gets a console window.

I think the swiches are correct:

dmc -c -WA

I have to add FreeConsole() at the very start of the WinMain function.

What else can I do to remove the unnecessary console window?
May 20 2004
parent reply "KTC" <me here.com> writes:
"Edward Yang" wrote ...

 However I find that every WIN32 GUI application gets a console window.

 I think the swiches are correct:

 dmc -c -WA
You need to specify -EXETYPE:NT & -SUBSYSTEM:WINDOWS with the linker as well. So: dmc -c -WA test.c link -SUBSYSTEM:WINDOWS -EXETYPE:NT test.obj KTC -- Experience is a good school but the fees are high. - Heinrich Heine
May 22 2004
parent Edward Yang <neo_in_matrix msn.com> writes:
KTC wrote:
 "Edward Yang" wrote ...
 
 
However I find that every WIN32 GUI application gets a console window.

I think the swiches are correct:

dmc -c -WA
You need to specify -EXETYPE:NT & -SUBSYSTEM:WINDOWS with the linker as well. So: dmc -c -WA test.c link -SUBSYSTEM:WINDOWS -EXETYPE:NT test.obj KTC
Thanks. That works for me. It seems Relo has a small bug in its configuration file for DMC++ (it has no -SUBSYSTEM:WINDOWS for the linker).
May 23 2004