libolt
15-08-2015 05:51:31
I am having a problem building my game with MyGUI from latest git on an OpenSUSE Tumbleweed system with GCC 5.1. MyGUI itself builds and installs fine, however when I go to build my game I get the following errors related to MyGUI headers:
I wiped out all traces of mygui on my system, did a fresh git checkout and everything before building. The same git revisions of MyGUI and my game project work fine on windows/MSVC2013, windows/mingw-w64 gcc 4.9.2 and android gcc 4.6. I have no problems building on these platforms. I am guessing something has changed in GCC 5.1 since it is a major revision. Any help is greatly appreciated.
In file included from /usr/include/X11/Xlib.h:44:0,
from /usr/include/SDL2/SDL_syswm.h:70,
from /home/libolt/Projects/ubc-qtcreator/include/renderengine.h:55,
from /home/libolt/Projects/ubc-qtcreator/src/game/renderengine.cpp:27:
/usr/local/include/MYGUI/MyGUI_MouseButton.h:19:4: error: expected identifier before numeric constant
None = -1,
^
/usr/local/include/MYGUI/MyGUI_MouseButton.h:19:4: error: expected ‘}’ before numeric constant
/usr/local/include/MYGUI/MyGUI_MouseButton.h:19:4: error: expected unqualified-id before numeric constant
In file included from /usr/local/include/MYGUI/MyGUI_WidgetInput.h:14:0,
from /usr/local/include/MYGUI/MyGUI_Widget.h:14,
from /usr/local/include/MYGUI/MyGUI_Gui.h:15,
from /usr/local/include/MYGUI/MyGUI.h:10,
from /home/libolt/Projects/ubc-qtcreator/include/gui.h:30,
from /home/libolt/Projects/ubc-qtcreator/src/game/renderengine.cpp:30:
/usr/local/include/MYGUI/MyGUI_MouseButton.h:36:20: error: expected ‘)’ before ‘_value’
MouseButton(Enum _value = None) :
^
/usr/local/include/MYGUI/MyGUI_MouseButton.h:41:3: error: ‘friend’ used outside of class
friend bool operator == (MouseButton const& a, MouseButton const& b)
^
/usr/local/include/MYGUI/MyGUI_MouseButton.h: In function ‘bool MyGUI::operator==(const MyGUI::MouseButton&, const MyGUI::MouseButton&)’:
/usr/local/include/MYGUI/MyGUI_MouseButton.h:43:13: error: ‘const struct MyGUI::MouseButton’ has no member named ‘mValue’
return a.mValue == b.mValue;
^
/usr/local/include/MYGUI/MyGUI_MouseButton.h:43:25: error: ‘const struct MyGUI::MouseButton’ has no member named ‘mValue’
return a.mValue == b.mValue;
^
/usr/local/include/MYGUI/MyGUI_MouseButton.h: At global scope:
/usr/local/include/MYGUI/MyGUI_MouseButton.h:46:3: error: ‘friend’ used outside of class
friend bool operator != (MouseButton const& a, MouseButton const& b)
^
/usr/local/include/MYGUI/MyGUI_MouseButton.h: In function ‘bool MyGUI::operator!=(const MyGUI::MouseButton&, const MyGUI::MouseButton&)’:
/usr/local/include/MYGUI/MyGUI_MouseButton.h:48:13: error: ‘const struct MyGUI::MouseButton’ has no member named ‘mValue’
return a.mValue != b.mValue;
^
/usr/local/include/MYGUI/MyGUI_MouseButton.h:48:25: error: ‘const struct MyGUI::MouseButton’ has no member named ‘mValue’
return a.mValue != b.mValue;
^
/usr/local/include/MYGUI/MyGUI_MouseButton.h: At global scope:
/usr/local/include/MYGUI/MyGUI_MouseButton.h:51:18: error: non-member function ‘int MyGUI::getValue()’ cannot have cv-qualifier
int getValue() const
^
/usr/local/include/MYGUI/MyGUI_MouseButton.h: In function ‘int MyGUI::getValue()’:
/usr/local/include/MYGUI/MyGUI_MouseButton.h:53:11: error: ‘mValue’ was not declared in this scope
return mValue;
^
/usr/local/include/MYGUI/MyGUI_MouseButton.h: At global scope:
/usr/local/include/MYGUI/MyGUI_MouseButton.h:56:2: error: expected unqualified-id before ‘private’
private:
^
/usr/local/include/MYGUI/MyGUI_MouseButton.h:60:1: error: expected declaration before ‘}’ token
} // namespace MyGUI
^
CMakeFiles/ubc.dir/build.make:758: recipe for target 'CMakeFiles/ubc.dir/src/game/renderengine.cpp.o' failed
make[2]: *** [CMakeFiles/ubc.dir/src/game/renderengine.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/ubc.dir/all' failed
make[1]: *** [CMakeFiles/ubc.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
I wiped out all traces of mygui on my system, did a fresh git checkout and everything before building. The same git revisions of MyGUI and my game project work fine on windows/MSVC2013, windows/mingw-w64 gcc 4.9.2 and android gcc 4.6. I have no problems building on these platforms. I am guessing something has changed in GCC 5.1 since it is a major revision. Any help is greatly appreciated.