Closed akien-mga closed 6 years ago
I definitely recall getting this error before (on a different project) and it should be really easy to fix.
That should fix the issue.
I'm still having build issues with GCC 5.5.0 after 05c9936:
g++ -o build/obj/scenedit/scen.fileio.o -c -std=c++11 -include global.hpp -DTIXML_USE_TICPP -Isrc -Isrc/classes -Isrc/tools -Isrc/fileio -Isrc/fileio/gzstream -Isrc/fileio/resmgr -Isrc/fileio/xml-parser -Isrc/gfx -Isrc/dialogxml/dialogs -Isrc/dialogxml/widgets -Isrc/scenario -Isrc/universe build/obj/scenedit/scen.fileio.cpp
In file included from src/scenario/talking.hpp:14:0,
from src/scenario/town.hpp:19,
from src/scenario/scenario.hpp:22,
from build/obj/scenedit/scen.fileio.cpp:4:
src/scenario/shop.hpp:55:21: warning: multi-character character constant [-Wmultichar]
cItem item = cItem('shop');
^
In file included from src/dialogxml/dialogs/dialog.hpp:23:0,
from src/dialogxml/widgets/control.hpp:22,
from src/dialogxml/widgets/pict.hpp:19,
from build/obj/scenedit/scen.keydlgs.hpp:3,
from build/obj/scenedit/scen.fileio.cpp:10:
src/fileio/xml-parser/ticpp.h:998:8: warning: 'template<class> class std::auto_ptr' is deprecated [-Wdeprecated-declarations]
std::auto_ptr< Node > Clone() const;
^
In file included from /usr/include/c++/5.5.0/bits/locale_conv.h:41:0,
from /usr/include/c++/5.5.0/locale:43,
from /usr/include/boost/filesystem/path_traits.hpp:29,
from /usr/include/boost/filesystem/path.hpp:25,
from src/scenario/scenario.hpp:14,
from build/obj/scenedit/scen.fileio.cpp:4:
/usr/include/c++/5.5.0/bits/unique_ptr.h:49:28: note: declared here
template<typename> class auto_ptr;
^
build/obj/scenedit/scen.fileio.cpp:66:84: error: specialization of 'template<class T> void ticpp::Printer::PushElement(std::__cxx11::string, T, bool)' in different namespace [-fpermissive]
template<> void ticpp::Printer::PushElement(std::string tagName, location pos, bool) {
^
In file included from build/obj/scenedit/scen.fileio.cpp:19:0:
src/fileio/xml-parser/tinyprint.h:38:29: error: from definition of 'template<class T> void ticpp::Printer::PushElement(std::__cxx11::string, T, bool)' [-fpermissive]
template<typename T> void PushElement(std::string tagName, T elemVal, bool cdata = false) {
^
build/obj/scenedit/scen.fileio.cpp:73:86: error: specialization of 'template<class T> void ticpp::Printer::PushElement(std::__cxx11::string, T, bool)' in different namespace [-fpermissive]
template<> void ticpp::Printer::PushElement(std::string tagName, rectangle rect, bool) {
^
In file included from build/obj/scenedit/scen.fileio.cpp:19:0:
src/fileio/xml-parser/tinyprint.h:38:29: error: from definition of 'template<class T> void ticpp::Printer::PushElement(std::__cxx11::string, T, bool)' [-fpermissive]
template<typename T> void PushElement(std::string tagName, T elemVal, bool cdata = false) {
^
build/obj/scenedit/scen.fileio.cpp:82:96: error: specialization of 'template<class T> void ticpp::Printer::PushElement(std::__cxx11::string, T, bool)' in different namespace [-fpermissive]
template<> void ticpp::Printer::PushElement(std::string tagName, cMonster::cAttack attack, bool) {
^
In file included from build/obj/scenedit/scen.fileio.cpp:19:0:
src/fileio/xml-parser/tinyprint.h:38:29: error: from definition of 'template<class T> void ticpp::Printer::PushElement(std::__cxx11::string, T, bool)' [-fpermissive]
template<typename T> void PushElement(std::string tagName, T elemVal, bool cdata = false) {
^
build/obj/scenedit/scen.fileio.cpp:91:97: error: specialization of 'template<class T> void ticpp::Printer::PushElement(std::__cxx11::string, T, bool)' in different namespace [-fpermissive]
template<> void ticpp::Printer::PushElement(std::string tagName, cOutdoors::cWandering enc, bool) {
^
In file included from build/obj/scenedit/scen.fileio.cpp:19:0:
src/fileio/xml-parser/tinyprint.h:38:29: error: from definition of 'template<class T> void ticpp::Printer::PushElement(std::__cxx11::string, T, bool)' [-fpermissive]
template<typename T> void PushElement(std::string tagName, T elemVal, bool cdata = false) {
^
build/obj/scenedit/scen.fileio.cpp:111:94: error: specialization of 'template<class T> void ticpp::Printer::PushElement(std::__cxx11::string, T, bool)' in different namespace [-fpermissive]
template<> void ticpp::Printer::PushElement(std::string tagName, info_rect_t rect, bool cdata) {
^
In file included from build/obj/scenedit/scen.fileio.cpp:19:0:
src/fileio/xml-parser/tinyprint.h:38:29: error: from definition of 'template<class T> void ticpp::Printer::PushElement(std::__cxx11::string, T, bool)' [-fpermissive]
template<typename T> void PushElement(std::string tagName, T elemVal, bool cdata = false) {
^
Edit: Added the other warnings triggered on that file.
I'm hitting a build issue on Mageia 6 x86_64 with GCC 5.5.0. It compiles fine with Clang 3.9.1 on the same system.
Note: To build with GCC, you need #190. And to reach this error, you need #189 merged to fix an earlier one.