{"action":"created","issue":{"url":"https://api.github.com/repos/bjorn/tiled/issues/1107","labels_url":"https://api.github.com/repos/bjorn/tiled/issues/1107/labels{/name}","comments_url":"https://api.github.com/repos/bjorn/tiled/issues/1107/comments","events_url":"https://api.github.com/repos/bjorn/tiled/issues/1107/events","html_url":"https://github.com/bjorn/tiled/issues/1107","id":109724163,"number":1107,"title":"Compilation fails - \"'move' is not a member of 'std'\"","user":{"login":"0ion9","id":115782,"avatar_url":"https://avatars.githubusercontent.com/u/115782?v=3","gravatar_id":"","url":"https://api.github.com/users/0ion9","html_url":"https://github.com/0ion9","followers_url":"https://api.github.com/users/0ion9/followers","following_url":"https://api.github.com/users/0ion9/following{/other_user}","gists_url":"https://api.github.com/users/0ion9/gists{/gist_id}","starred_url":"https://api.github.com/users/0ion9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0ion9/subscriptions","organizations_url":"https://api.github.com/users/0ion9/orgs","repos_url":"https://api.github.com/users/0ion9/repos","events_url":"https://api.github.com/users/0ion9/events{/privacy}","received_events_url":"https://api.github.com/users/0ion9/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-10-05T03:09:26Z","updated_at":"2015-10-05T08:03:22Z","closed_at":"2015-10-05T08:01:34Z","body":"$ qmake\r\n$ make\r\n\r\n[...]\r\n```\r\ng++ -c -pipe -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DTILED_LIBRARY -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -o gidmapper.o gidmapper.cpp\r\nIn file included from layer.h:34:0,\r\n                 from map.h:34,\r\n                 from gidmapper.h:32,\r\n                 from gidmapper.cpp:29:\r\ntileset.h:256:5: warning: identifier ‘nullptr’ is a keyword in C++11 [-Wc++0x-compat]\r\n     Terrain *terrain(int index) const { return index >= 0 ? mTerrainTypes[index] : nullptr; }\r\n     ^\r\ntileset.h: In constructor ‘Tiled::Tileset::Tileset(QString, int, int, int, int)’:\r\ntileset.h:94:15: error: ‘move’ is not a member of ‘std’\r\n         mName(std::move(name)),\r\n               ^\r\ntileset.h: In member function ‘Tiled::Terrain* Tiled::Tileset::terrain(int) const’:\r\ntileset.h:256:84: error: ‘nullptr’ was not declared in this scope\r\n     Terrain *terrain(int index) const { return index >= 0 ? mTerrainTypes[index] : nullptr; }\r\n                                                                                    ^\r\nIn file included from gidmapper.h:32:0,\r\n                 from gidmapper.cpp:29:\r\nmap.h: At global scope:\r\nmap.h:480:1: error: expected constructor, destructor, or type conversion before ‘Q_DECLARE_METATYPE’\r\n Q_DECLARE_METATYPE(Tiled::Map::LayerDataFormat)\r\n ^\r\nMakefile:684: recipe for target 'gidmapper.o' failed\r\nmake[2]: *** [gidmapper.o] Error 1\r\n```\r\n\r\nThis [link](http://stackoverflow.com/questions/9408082/c11-gcc-4-6-2-stdmove) seems relevant, it states that you have to specify a particular option or certain things like std::move are excluded via #ifdef.\r\n\r\nAdding this flag -- `-std=c++11` to CXXFLAGS removes most errors. However the \r\n\r\n```\r\nmap.h:480:1: error: expected constructor, destructor, or type conversion before ‘Q_DECLARE_METATYPE’\r\n Q_DECLARE_METATYPE(Tiled::Map::LayerDataFormat)\r\n ^\r\n```\r\n\r\nerror is still present. This seems to be due to a missing include -- adding `#include <QMetaType>`  allows gidmapper.cpp to compile.\r\n\r\nLater, when compiling mapreader.cpp,\r\n\r\n```\r\ng++ -c -pipe -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DTILED_LIBRARY -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -std=c++11 -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -o mapreader.o mapreader.cpp\r\nmapreader.cpp: In member function ‘Tiled::Map* Tiled::Internal::MapReaderPrivate::readMap()’:\r\nmapreader.cpp:219:48: error: ‘class QStringRef’ has no member named ‘toInt’\r\n             atts.value(QLatin1String(\"width\")).toInt();\r\n                                                ^\r\n[lots more .toInt() errors follow]\r\n```\r\nWhich is interesting, since the QT 4.8 reference states that there IS a member named 'toInt', and the contents of /usr/include/qt4/QtCore/qstring.h confirm this idea.\r\n\r\nOverall, I can summarize as:\r\n* You are using C++11 features, but the flag to enable them doesn't seem to be present\r\n* `<QMetaType>` needs to be #included in map.h; My guess is that in an earlier QT4 version, it was included automatically as part of some other Q* include, and in newer versions is no longer included in that other header file\r\n* Missing toInt member for QLatinString1; since the headers and the QT4.8 ref state otherwise, no idea what is the problem here. \r\n\r\n\r\ntiled git hash : current HEAD (9c2be76 Merge pull request #1100 )\r\nOS: Arch Linux x86_64\r\ngcc version: 5.2.0 (multilib)\r\nQT4 version: 4.8.7\r\n\r\n(QT5 5.5.0 is also installed, FWIW)"},"comment":{"url":"https://api.github.com/repos/bjorn/tiled/issues/comments/145457162","html_url":"https://github.com/bjorn/tiled/issues/1107#issuecomment-145457162","issue_url":"https://api.github.com/repos/bjorn/tiled/issues/1107","id":145457162,"user":{"login":"bjorn","id":531764,"avatar_url":"https://avatars.githubusercontent.com/u/531764?v=3","gravatar_id":"","url":"https://api.github.com/users/bjorn","html_url":"https://github.com/bjorn","followers_url":"https://api.github.com/users/bjorn/followers","following_url":"https://api.github.com/users/bjorn/following{/other_user}","gists_url":"https://api.github.com/users/bjorn/gists{/gist_id}","starred_url":"https://api.github.com/users/bjorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjorn/subscriptions","organizations_url":"https://api.github.com/users/bjorn/orgs","repos_url":"https://api.github.com/users/bjorn/repos","events_url":"https://api.github.com/users/bjorn/events{/privacy}","received_events_url":"https://api.github.com/users/bjorn/received_events","type":"User","site_admin":false},"created_at":"2015-10-05T08:03:22Z","updated_at":"2015-10-05T08:03:22Z","body":"Note that you can alternatively compile Tiled using `qbs`, which provides a generally nicer experience than `qmake`. On Arch Linux this tool is shipping in the `qtcreator` package."}}