News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

What does an g++ option "-mwindows"

Started by Youda008, July 27, 2015, 05:37:45 PM

Previous topic - Next topic

Youda008

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.

stahta01

Please read the rules and learn how to use Google!
http://forums.next.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++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

Youda008

#2
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.