www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

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

↑ ↓ ← 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
↑ ↓ "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
↑ ↓ → 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