Author Topic: What does an g++ option "-mwindows"  (Read 4150 times)

Offline Youda008

  • Single posting newcomer
  • *
  • Posts: 3
What does an g++ option "-mwindows"
« on: July 27, 2015, 05:37:45 pm »
Hi.
Can you explain me, what a g++ command line option "-mwindows" does? The CodeBlocks adds it to the flags when compiling a project for some reason, and the application then won't start properly. When i write a custom Makefile, delete this option and build a project with it, application works.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7670
    • My Best Post
Re: What does an g++ option "-mwindows"
« Reply #1 on: July 27, 2015, 05:42:13 pm »
Please read the rules and learn how to use Google!
http://forums.codeblocks.org/index.php/topic,9996.0.html

CB adds it because certain types of targets needs the option to run or build correctly.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Youda008

  • Single posting newcomer
  • *
  • Posts: 3
Re: What does an g++ option "-mwindows"
« Reply #2 on: July 27, 2015, 05:49:33 pm »
Oh sorry. I have been trying to find out for whole afternoon, why my application does not starts properly and only runs on background using 1 whole core. Google showed nothing on many pages, I've almost gone berserk, and forgot to use the forum search.

Edit: Now with the help of other threads i found, that my project has type "GUI application". I have no idea how it got there, but setting it back to "Console" solves the problem.
« Last Edit: July 27, 2015, 05:54:39 pm by Youda008 »