我正在使用Azerothcore的文档来安装它,在使用命令“ make”时出现以下错误:
/home/wowazerothcore/azerothcore/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp:57:65: fatal error: no matching constructor for initialization of 'const std::unordered_map<uint32, std::tuple<uint32, Position> >'
std::unordered_map<uint32, std::tuple <uint32, Position>> const npcSummon =
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/unordered_map.h:139:7: note: candidate constructor not viable: cannot convert initializer list argument to 'size_type' (aka 'unsigned long')
unordered_map(size_type __n = 10,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/unordered_map.h:214:7: note: candidate constructor not viable: no known conversion from 'Misc' to
'std::pair<const unsigned int, std::tuple<unsigned int, Position> >' for 1st argument
unordered_map(initializer_list<value_type> __l,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/unordered_map.h:160:2: note: candidate template ignored: couldn't infer template argument '_InputIterator'
unordered_map(_InputIterator __f, _InputIterator __l,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/unordered_map.h:188:7: note: candidate constructor not viable: requires 2 arguments, but 3 were provided
unordered_map(const unordered_map& __umap,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/unordered_map.h:198:7: note: candidate constructor not viable: requires 2 arguments, but 3 were provided
unordered_map(unordered_map&& __umap,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/unordered_map.h:169:7: note: candidate constructor not viable: requires 1 argument, but 3 were provided
unordered_map(const unordered_map&) = default;
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/unordered_map.h:172:7: note: candidate constructor not viable: requires 1 argument, but 3 were provided
unordered_map(unordered_map&&) = default;
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/unordered_map.h:179:7: note: candidate constructor not viable: requires single argument '__a', but 3 arguments were provided
unordered_map(const allocator_type& __a)
^
1 error generated.
src/server/scripts/CMakeFiles/scripts.dir/build.make:13452: recipe for target 'src/server/scripts/CMakeFiles/scripts.dir/Northrend/DraktharonKeep/boss_novos.cpp.o' failed
make[2]: *** [src/server/scripts/CMakeFiles/scripts.dir/Northrend/DraktharonKeep/boss_novos.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:1558: recipe for target 'src/server/scripts/CMakeFiles/scripts.dir/all' failed
make[1]: *** [src/server/scripts/CMakeFiles/scripts.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
如何解决此错误?
“ git log”命令具有以下第一行:
wowazerothcore @ rs000165:〜/ azerothcore $ git log
提交2bb868164e545d38da5c96a3ce683a5fcb3b72a6
gcc版本是
wowazerothcore @ rs000165:〜/ azerothcore $ gcc --version
gcc(Debian 4.9.2-10 + deb8u2)4.9.2
我怀疑您看到的错误原因是旧版本的gcc,因为编译器指向gcc包含文件。