Closed betzburger closed 8 months ago
Sorry it's a pain trying to write something that doesn't upset one compiler or another. My suggestion is to try itoa() instead of _itoa() and if that doesn't work code your own itoa(). It's a very simple thing - convert an integer to text, eg 43 -> "43". One easy way to do it is to go sprintf( buf, %d", n ); right ?
Duplicate of (https://github.com/billforsternz/tarrasch-chess-gui/issues/41)
The fix is:
// _itoa(nbr++, buf, 10); sprintf(buf, "%d", nbr++);
Hello,
I tried to compile it in Ubuntu 18.04, Ubuntu 16.04 and the latest Linux Mint version but I get this error:
g++ -c -g -std=c++11
wx-config --cxxflagsCompressMoves.cpp -o CompressMoves.o CompressMoves.cpp: In member function ‘std::__cxx11::string CompressMoves::ToNaturalMoves(const string&, const string&)’: CompressMoves.cpp:417:13: error: ‘_itoa’ was not declared in this scope _itoa(nbr++, buf, 10); ^~~~~ Makefile:10: recipe for target 'CompressMoves.o' failed make[1]: *** [CompressMoves.o] Error 1 make[1]: Leaving directory '/home/peter/sources/tarrasch-chess-gui/src' Makefile:6: recipe for target 'srccode' failed make: *** [srccode] Error 2
Any suggestions?