When I compile wxWidgets on standard Ubuntu 16.04 I am getting tons of compiler warnings. (e.g. locally defined but not used)
I know that the code still runs, but I have been using gcc under Windows (MingGw) and there I got no warnings at all. In the wiki installation instructions I found no hint on that and how I could avoid that. So what do I have to do to compile the code with no compiler warnings?
Linux compilation - tons of warnings Topic is solved
-
- Earned some good credits
- Posts: 123
- Joined: Sat Oct 07, 2006 1:56 pm
Linux compilation - tons of warnings
System config: Xubuntu22.04, wxWidgets 3.0.5,gcc, C::B
Re: Linux compilation - tons of warnings
Hi,
It's almost certainly related to the g++ you're using; recent versions have become increasingly pedantic and noisy.
What can you do about it? I just shut my eyes
But if you wish, you could try the latest git version of wx as IIRC there has been some work to reduce the number of warnings.
Or you could install and use an earlier g++ version.
Or you could look at the gcc options and try to pass ones that switch off the relevant messages. That means passing an option to the cxxflags your build is using; not always easy with wx, which tends to overwrite your changes.
Regards,
David
It's almost certainly related to the g++ you're using; recent versions have become increasingly pedantic and noisy.
What can you do about it? I just shut my eyes
But if you wish, you could try the latest git version of wx as IIRC there has been some work to reduce the number of warnings.
Or you could install and use an earlier g++ version.
Or you could look at the gcc options and try to pass ones that switch off the relevant messages. That means passing an option to the cxxflags your build is using; not always easy with wx, which tends to overwrite your changes.
Regards,
David
-
- Earned some good credits
- Posts: 123
- Joined: Sat Oct 07, 2006 1:56 pm
Re: Linux compilation - tons of warnings
Thanks
I helps to know that you guys are annoyed with it, too.
I agree that the best way is to bear with it, then
I helps to know that you guys are annoyed with it, too.
I agree that the best way is to bear with it, then
System config: Xubuntu22.04, wxWidgets 3.0.5,gcc, C::B