win32 apps compiled with GCC start console window!

This is a discussion on win32 apps compiled with GCC start console window! within the Windows Programming forums, part of the Platform Specific Boards category; For some reason when I compile my Win32 app with gcc and run the program, a console window is created ...

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    4

    win32 apps compiled with GCC start console window!

    For some reason when I compile my Win32 app with gcc and run the program, a console window is created before the application's GUI is displayed.

    If I close the console, the entire window closes.

    If I close the application via GUI, the console window also closes.

    In task manager, only one program is listed in the "Processes" tab. But in "Applications" there is one entry for the console, and one for the windowed app.

    I don't know why this is happening, but I want it to stop. Help!

  2. #2
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,230
    http://www.geocrawler.com/archives/3...11/50/1984911/ is something I found on a quick search withGoogle for a windows compiler switch with GCC. If you scroll down a little, someone says that they patched a byte in a header file to get a true GUI app.

  3. #3
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,230
    Other than that, I don't suggest compiling windows apps under GCC, try getting the Dev-C++ compiler. It's free, has a fairly nice GUI, and compiles windows apps normally.

  4. #4
    Registered User
    Join Date
    Feb 2002
    Posts
    4
    DOH

    I just did another search, and found a Cygwin page saying you should use the -mwindows parameter with gcc.

    I didn't find this in the GNU GCC documentation because it is (with good reason) specific to the win32 port of gcc.

  5. #5
    Registered User
    Join Date
    Jan 2002
    Posts
    49
    Just add -mwindows

    gcc -mwindows -o myfile.exe myfile.c

    and notice that Dev-C++ is an IDE which comes with gcc.

  6. #6
    Registered User
    Join Date
    Feb 2002
    Posts
    4
    Right now I'm using:

    mingw32 (includes gcc, binutils, win32 api headers, etc)
    with EditPlus2

    EditPlus is a really awesome editor. You can use it for pretty much any language, and customize it to run different programs with different parameters (like running windres on one file, gcc -c the open file, etc)

    You can customize pretty much everything about it and the interface is top notch.

    www.editplus.com

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Output to console window...
    By alvifarooq in forum C++ Programming
    Replies: 2
    Last Post: 10-26-2004, 08:56 PM
  2. Reading from a win32 console window.
    By knave in forum C++ Programming
    Replies: 4
    Last Post: 04-24-2003, 02:23 PM
  3. Picking up characters in console window
    By GaPe in forum C Programming
    Replies: 1
    Last Post: 11-03-2002, 05:21 PM
  4. opengl code not working
    By Unregistered in forum Windows Programming
    Replies: 4
    Last Post: 02-14-2002, 09:01 PM
  5. g_hWndMain = hWnd;error C2065,C2440
    By Unregistered in forum C++ Programming
    Replies: 3
    Last Post: 12-09-2001, 02:36 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21