Thread overview
My WIN32 GUI app always gets a console window
May 20, 2004
Edward Yang
May 22, 2004
KTC
May 23, 2004
Edward Yang
May 20, 2004
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 22, 2004
"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 23, 2004
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).