User forums > Using Code::Blocks

Template for FLTK application

(1/3) > >>

MortenMacFly:
Dear community,

I've submitted a patch to sourceforge that includes templates for a FLTK (GUI) application. I've used "-mwindows" as compiler option in the template which might be not correct (I read that -mwindows is deprecated). However: On several tutorials in the internet the "-mwindows" is common. So I actually don't know whether it's right or wrong, but it works, certainly.

Morten.

Urxae:
Remove -mwindows from every target you've added it to and then go to Project -> Properties -> Targets and set the top dropdown box to "GUI application" for those targets (It should only have been set for executables, right?).
This should pass the correct flags (if any) to any supported compiler/platform combination, not just MinGW on Windows.

MortenMacFly:

--- Quote from: Urxae on October 28, 2005, 09:16:37 am ---Remove -mwindows from every target

--- End quote ---
So this flag should be removed from the template before using.


--- Quote from: Urxae on October 28, 2005, 09:16:37 am ---go to Project -> Properties -> Targets and set the top dropdown box to "GUI application"

--- End quote ---
This is already done by the template.

...I am going to update the template files on SourceForge.net accordingly in a minute or two...

Morten.

thomas:

--- Quote from: MortenMacFly on October 28, 2005, 08:58:33 am ---I read that -mwindows is deprecated
--- End quote ---
I have read that too, a day or two ago, and honestly, I would like to know how this  statement justifies.
(Let's put aside the fact that you really should just set the combobox to GUI application)

MinGW accepts the parameter without giving a warning, neither does gcc 4.0 complain. Both the MinGW and the cygwin web sites explicitely state that either -mwindows or -Wl,--subsystem,windows can be used, the gcc 3.4.4 manual says nothing.

The only other reference actually saying that -mwindows is really deprecated is  some guy's post on some Allegro-associated forum "I believe that is deprecated".
How is that authorative?

MortenMacFly:

--- Quote from: thomas on October 28, 2005, 11:01:13 am ---The only other reference actually saying that -mwindows is really deprecated is  some guy's post on some Allegro-associated forum "I believe that is deprecated".
How is that authorative?

--- End quote ---
That's actually what I wanted to be clarified. I really don't know what's right - an application compiles with and without this parameter. But I thought switching to a "GUI" project takes care of the options in the right ways and that's why "-mwindows" can be removed. I would really like to be sure on this.

I tried a simple "Hello world" application with MinGW: The compiled applications are the same whether with or without "-mwindows". A thought that came into my mind was: Is it maybe a Cygwin specific parameter to get rid of cygwin.dll depenencies and create a Windows "native" application? But what's "-mno-cygwin" than? The same?

Anyone out there that really KNOWS it?

Morten.

Navigation

[0] Message Index

[#] Next page

Go to full version