Linux compilation - tons of warnings Topic is solved

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
tigerbeard
Earned some good credits
Earned some good credits
Posts: 123
Joined: Sat Oct 07, 2006 1:56 pm

Linux compilation - tons of warnings

Post by tigerbeard »

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?
System config: Xubuntu22.04, wxWidgets 3.0.5,gcc, C::B
DavidHart
Site Admin
Site Admin
Posts: 4252
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Linux compilation - tons of warnings

Post by DavidHart »

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
tigerbeard
Earned some good credits
Earned some good credits
Posts: 123
Joined: Sat Oct 07, 2006 1:56 pm

Re: Linux compilation - tons of warnings

Post by tigerbeard »

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
System config: Xubuntu22.04, wxWidgets 3.0.5,gcc, C::B
Post Reply