I compiled rev 1694 on Linux this afternoon. I got the following two errors when I built the source:
src/map/charutils.cpp:1544:80: error: invalid initialization of non-const reference of type 'std::list<CWeaponSkill*>&'std::list<CWeaponSkill*>&' from an rvalue of type 'std::list<CWeaponSkill*>'
src/map/charutils.cpp:1562:81: error: invalid initialization of non-const reference of type 'std::list<CWeaponSkill*>&' from an rvalue of type 'std::list<CWeaponSkill*>'
make: *** [dsgame-charutils.o] Error 1
I fixed these errors by changing 'std::list<CWeaponSkill*>& to 'std::list<CWeaponSkill*>. I haven't really done anything with C++ in years, but I think that what was being attempted here was a cast from a pointer type CWeaponSkill to the address of a pointer type, which was deemed illegal in Linux. Linux C++ is a lot stricter than Windows C++. I'm not sure if this is really what's supposed to happen in this statement, but if it was, this is how I fixed it. It compiled fine after that repair, just deleted the &...
Revision 1694 on Linux: errors with charutils.cpp
-
- Posts: 74
- Joined: Sun Jul 22, 2012 2:21 pm