I have a problem compiling a C++ program and I tried to find the issue and solve it but currently I wasn't able to find the source of the problem. I will appreciate if someone give me a hand :)
The error given is: (compiling under Centos 6.3 with gcc 4.4.7)
In file included from /home/server/Sources/MOP/MistCore/src/server/scripts/PrecompiledHeaders/ScriptPCH.h:25,
from /home/server/Sources/MOP/MistCore/src/server/game/Anticheat/AnticheatMgr.h:7,
from /home/server/Sources/MOP/MistCore/src/server/game/Anticheat/AnticheatData.h:4,
from /home/server/Sources/MOP/MistCore/src/server/game/Anticheat/AnticheatData.cpp:1:
/home/server/Sources/MOP/MistCore/src/server/game/Spells/SpellScript.h: In constructor ‘AuraScript::AuraScript()’:
/home/server/Sources/MOP/MistCore/src/server/game/Spells/SpellScript.h:619: error: no matching function for call to ‘std::shared_ptr<Aura>::shared_ptr(NULL)’
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/shared_ptr.h:1263: note: candidates are: std::shared_ptr<_Tp>::shared_ptr(std::shared_ptr<_Tp>&&) [with _Tp = Aura]
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/shared_ptr.h:1238: note: std::shared_ptr<_Tp>::shared_ptr() [with _Tp = Aura]
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/shared_ptr.h:1236: note: std::shared_ptr<Aura>::shared_ptr(const std::shared_ptr<Aura>&)
make[2]: *** [src/server/game/CMakeFiles/game.dir/Anticheat/AnticheatData.cpp.o] Error 1
make[1]: *** [src/server/game/CMakeFiles/game.dir/all] Error 2
make: *** [all] Error 2
Files:
SpellScript.cpp
: http://pastebin.com/Cam59CWtSpellScript.h
: http://pastebin.com/XYp6pSf9
Yeah, it's a long piece of code.
You can specifi the flag using -std=c++11