Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9026079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T06:25:58+00:00 2026-06-16T06:25:58+00:00

One of the things I find nice about CodeBlocks is that it allows me

  • 0

One of the things I find nice about CodeBlocks is that it allows me to quickly create, compile and run a file without creating a project. However, this means that all of my programs have console windows, something that isn’t normal for most Windows applications.

To get rid of it, I’ve always had to create a project, throw my file in, and navigate to where I could just click GUI Application instead of Console Application.

However, it’s obviously possible to specify the same thing when building using g++.exe and ld.exe, and CodeBlocks has a section for additional linker options, so I figured I could stick it in there to avoid the hassle of always creating a project, but apparently I was wrong.

Firstly, I found this question. I was surprised when I found out who answered it, but that doesn’t help me, as the whole point of this is that I can do it with about the same amount of effort without creating a project.

Apparently, the -mwindows compiler option will do that, so I tried putting that in Settings\Compiler and Debugger\Compiler settings\Other options, and it compiles and links fine, but still has a console window.

Next, I tried Settings\Compiler and Debugger\Linker settings\Other linker options. Fuelled by Google results, I’ve tried adding the following to there, one option active at a time, and rebuilding. Having -mwindows active makes no difference as far as I can tell.

-Wl: Unrecognized command line option
–subsystem,windows: Unrecognized command line option
–subsystem, windows: windows – No such file or directory.
–subsystem windows: windows – No such file or directory.
–subsystem=windows: Unregocnized command line option
–subsystem, console: console – No such file or directory.

This testing was all done on the newest release of CodeBlocks, CodeBlocks 12.11, and GCC 4.7.2, obtained from this MinGW distro (version 9.4). However, I’m fairly certain it works the same way with CodeBlocks 10.05.

Am I forced to use a project, use a makefile, or build it from the command line, or is it possible to change this setting right in the CodeBlocks IDE global settings?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T06:25:59+00:00Added an answer on June 16, 2026 at 6:25 am

    Passing -Wl,--subsystem,windows to the linker is the proper way to do this. If it appears not to work then make sure that you didn’t insert a space somewhere; use the argument as it is.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i notice one nice things that a amazon provide that is load pdf data
i'm creating a simple forum in my database, and one of the things that
One of the things that block objects, introduced in Snow Leopard, are good for
This is one of those things that you read once, say aha! and then
Recently I found out that there are several things that one can do to
I plan to develop a nice little application that will run on an arm-based
One thing I find myself often wanting to do is convert a large associative
Apparently MapReduce queries are one of the slowest things one can do in MongoDB
One of the things I would like to follow is to stick to the
One of the things I love is the new Android Favorites Contact screen: I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.