Project

General

Profile

Bug #683512

gui-qt error while compiling with --disable-nls

Added by David Fernandez (bard) 4 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Category:
gui-qt
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

When I compile v2.6 beta0 with no native lenguage support (I use it to see english texts instead of my native spanish), it sends this error:

helpdlg.cpp: In member function 'void help_widget::set_topic_terrain(const help_item*, const char*)':
helpdlg.cpp:1324:90: error: deprecated conversion from string constant to 'char*' [-Werror=write-strings]
       add_extras_of_act_for_terrain(pterrain, ACTIVITY_IRRIGATE, _("Build as irrigation"));
                                                                                          ^
helpdlg.cpp:1328:80: error: deprecated conversion from string constant to 'char*' [-Werror=write-strings]
       add_extras_of_act_for_terrain(pterrain, ACTIVITY_MINE, _("Build as mine"));
                                                                                ^
helpdlg.cpp:1330:82: error: deprecated conversion from string constant to 'char*' [-Werror=write-strings]
     add_extras_of_act_for_terrain(pterrain, ACTIVITY_GEN_ROAD, _("Build as road"));
                                                                                  ^
helpdlg.cpp:1331:78: error: deprecated conversion from string constant to 'char*' [-Werror=write-strings]
     add_extras_of_act_for_terrain(pterrain, ACTIVITY_BASE, _("Build as base"));
                                                                              ^
At global scope:
cc1plus: error: unrecognized command line option '-Wno-nonnull-compare' [-Werror]
cc1plus: error: unrecognized command line option '-Wno-tautological-compare' [-Werror]
cc1plus: all warnings being treated as errors
Makefile:840: recipe for target 'helpdlg.lo' failed
make[2]: *** [helpdlg.lo] Error 1

There is no error when I compile with native lenguage support enabled (spanish version).

History

#1 Updated by David Fernandez (bard) 4 months ago

I just noticed that it is a warning, treated as error because I compile with --enable-debug.
It compiles if I remove any of --disable-nls or --enable-debug, but it fails if I try to use both.

#2 Updated by Marko Lindqvist 4 months ago

Does attached patch help?

#3 Updated by David Fernandez (bard) 4 months ago

Yes, there is no error (nor warning) once patched.

#4 Updated by Marko Lindqvist 4 months ago

  • Status changed from Resolved to Closed
  • Assignee set to Marko Lindqvist

Also available in: Atom PDF