Comment 1 for bug 1323483

Revision history for this message
Julio (artofwar) wrote :

As a hack, I added the following to stratagus.h:

#include "stdlib.h"

which got me past the atoi() problem, but then I ran into another problem:

[ 85%] Building CXX object CMakeFiles/stratagus.dir/src/ui/mouse.cpp.o
/Network/Servers/server.private/NetworkUsers/julio/Development/Stratagus_Wargus/stratagus.8886/src/ui/mouse.cpp:1873:11: error: no member named 'abs' in namespace 'std'; did you
      mean simply 'abs'?
                if (1 < std::abs(CursorStartScreenPos.x - CursorScreenPos.x)
                        ^~~~~~~~
                        abs
/usr/include/stdlib.h:129:6: note: 'abs' declared here
int abs(int) __pure2;
         ^
/Network/Servers/server.private/NetworkUsers/julio/Development/Stratagus_Wargus/stratagus.8886/src/ui/mouse.cpp:1874:11: error: no member named 'abs' in namespace 'std'; did you
      mean simply 'abs'?
                        || 1 < std::abs(CursorStartScreenPos.y - CursorScreenPos.y)) {
                               ^~~~~~~~
                               abs
/usr/include/stdlib.h:129:6: note: 'abs' declared here
int abs(int) __pure2;
         ^

Removing the "std::" from the abs() in ui/mouse.cpp allowed me to finally completely build stratagus (with about a dozen warnings.)

Problems still...

Game starts okay, can navigate menus, can even create a networked game and others can join... HOWEVER... as soon as game starts it crashes. Happens in both multi and single player: as soon as game starts window disappears.