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
Experienced Solver
Experienced Solver
Posts: 62
Joined: Sat Oct 07, 2006 1:56 pm

Linux compilation - tons of warnings

Post by tigerbeard » Thu Sep 20, 2018 11:14 am

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: Xubuntu16.04/Win7/XP/2K, wxWidgets 2.9.3, C::B, GCC, VC

DavidHart
Site Admin
Site Admin
Posts: 3829
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Linux compilation - tons of warnings

Post by DavidHart » Thu Sep 20, 2018 1:04 pm

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
Experienced Solver
Experienced Solver
Posts: 62
Joined: Sat Oct 07, 2006 1:56 pm

Re: Linux compilation - tons of warnings

Post by tigerbeard » Thu Sep 20, 2018 1:20 pm

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: Xubuntu16.04/Win7/XP/2K, wxWidgets 2.9.3, C::B, GCC, VC

Post Reply