CodeBlocks - about Win32 Projects

This is a discussion on CodeBlocks - about Win32 Projects within the Windows Programming forums, part of the Platform Specific Boards category; Hi everyone! I created a Win32 project in CodeBlocks, and compiled the original main.cpp file only. When I open the ...

  1. #1
    Registered User
    Join Date
    Oct 2010
    Posts
    114

    CodeBlocks - about Win32 Projects

    Hi everyone! I created a Win32 project in CodeBlocks, and compiled the original main.cpp file only. When I open the .exe file (in the bin folder of the project folder), the program executes normally, but why does the console window open in the background? Is there any way of preventing this from happening? Thanks in advance!

  2. #2
    Registered User
    Join Date
    Jan 2009
    Location
    Australia
    Posts
    375
    Code::Blocks usually creates two versions of your application, a release and debug version. Maybe you are compiling/running the debug version.

    Otherwise, try going to Project > Properties > Build Options > Type and make sure it is set to GUI application.

  3. #3
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Yep... make sure it's set as a GUI project and you are using WinMain() instead of main().

  4. #4
    Registered User
    Join Date
    Oct 2010
    Posts
    114
    I appreciate your help! I went to Project > Properties > Build Targets > Selected the Release option from the list (Debug, Release), and its option is set as GUI application. I pressed OK and recompiled the project. However, in both the bin and obj folders only the Debug folder was created. What am I doing wrong? Thanks again!

  5. #5
    Registered User
    Join Date
    Oct 2010
    Posts
    114
    Nevermind! I still had to change the actual build target for the building process. Thanks!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. need help, using/setting up codeblocks
    By xBlAzEx in forum C++ Programming
    Replies: 3
    Last Post: 04-25-2009, 06:32 PM
  2. Problem With std::string in Codeblocks.
    By ThLstN in forum C++ Programming
    Replies: 4
    Last Post: 08-24-2008, 11:01 AM
  3. Codeblocks gets a new release
    By indigo0086 in forum A Brief History of Cprogramming.com
    Replies: 20
    Last Post: 03-01-2008, 01:36 PM
  4. setting up directx with codeblocks?
    By michaelp in forum Game Programming
    Replies: 5
    Last Post: 01-12-2008, 04:40 PM
  5. Replies: 11
    Last Post: 05-25-2007, 04:39 PM

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