Re: Compilation with gtkmm gives a lot of warnings



There's a simple fix for that: Don't use -Weffc++. The C++ standard
library g++ uses (I think it's called libstdc++) doesn't even pass
without, or with only a few warnings when having that flag enabled. For
example, it warns you about class members that are not explicitly
initialized in each constructor of that class (which might make sense
for pointers and maybe primitive types, but almost never for objects).

If you want to get more warnings about possible problems than you get
with "-Wall", use "-Wall -Wextra -pedantic". If you think your compiler
could still detect more potential problems, the best thing to do IMHO is
copy-pasting a list of warning flags from a list like this[1].

[1] http://stackoverflow.com/a/9862800/1592377

Am 18.01.2015 um 19:15 schrieb Frédéric Fort:
Hello,

I am trying to learn how to use gtkmm for some days now.
Unfortunately, my compiler sends a lot of errors because of gtkmm, when
I add warning flags.

When compiling a minimalistic program (a Gtk::Main and an empty
Gtk::Window) with the flag -Weffc++ alone, I get 221 warnings.
Looking for problems in my source code becomes very difficult thus.

Are there any solutions for this problem (except instantly writing
perfect code and not needing warnings) or plans to reduce the amount of
warnings sent during compilation ?

_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
https://mail.gnome.org/mailman/listinfo/gtkmm-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]