Author Topic: Can't compile ghost  (Read 1879 times)

czacha994

  • Newbie
  • *
  • Posts: 5
  • Karma: +1/-0
    • View Profile
Can't compile ghost
« on: February 06, 2015, 10:16:45 am »
I tried to compile ghost folder. Unfortunately it gives me errors... How can i fix them ?
Code: [Select]
g++ -o bnet.o  -O3 -DBOOST_FILESYSTEM=VERSION=3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c bnet.cpp
bnet.cpp: In member function ‘void CBNET::ProcessChatEvent(CIncomingChatEvent*)’:
bnet.cpp:1683:51: error: ‘boost::filesystem::basic_path<std::basic_string<char>, boost::filesystem::path_traits>::string_type’ has no member named ‘string’
          string FileName = i->path( ).filename( ).string( );
                                                   ^
bnet.cpp:1684:43: error: ‘boost::filesystem::basic_path<std::basic_string<char>, boost::filesystem::path_traits>::string_type’ has no member named ‘string’
          string Stem = i->path( ).stem( ).string( );
                                           ^
bnet.cpp:1694:53: error: ‘boost::filesystem::basic_path<std::basic_string<char>, boost::filesystem::path_traits>::string_type’ has no member named ‘string’
            FoundMapConfigs = i->path( ).filename( ).string( );
                                                     ^
bnet.cpp:1696:61: error: ‘boost::filesystem::basic_path<std::basic_string<char>, boost::filesystem::path_traits>::string_type’ has no member named ‘string’
            FoundMapConfigs += ", " + i->path( ).filename( ).string( );
                                                             ^
bnet.cpp:1712:46: error: ‘boost::filesystem::basic_path<std::basic_string<char>, boost::filesystem::path_traits>::string_type’ has no member named ‘string’
          string File = LastMatch.filename( ).string( );
                                              ^
bnet.cpp:1794:51: error: ‘boost::filesystem::basic_path<std::basic_string<char>, boost::filesystem::path_traits>::string_type’ has no member named ‘string’
          string FileName = i->path( ).filename( ).string( );
                                                   ^
bnet.cpp:1795:43: error: ‘boost::filesystem::basic_path<std::basic_string<char>, boost::filesystem::path_traits>::string_type’ has no member named ‘string’
          string Stem = i->path( ).stem( ).string( );
                                           ^
bnet.cpp:1805:47: error: ‘boost::filesystem::basic_path<std::basic_string<char>, boost::filesystem::path_traits>::string_type’ has no member named ‘string’
            FoundMaps = i->path( ).filename( ).string( );
                                               ^
bnet.cpp:1807:55: error: ‘boost::filesystem::basic_path<std::basic_string<char>, boost::filesystem::path_traits>::string_type’ has no member named ‘string’
            FoundMaps += ", " + i->path( ).filename( ).string( );
                                                       ^
bnet.cpp:1823:46: error: ‘boost::filesystem::basic_path<std::basic_string<char>, boost::filesystem::path_traits>::string_type’ has no member named ‘string’
          string File = LastMatch.filename( ).string( );
                                              ^
make: *** [bnet.o] Error 1
My boost version is 1.55.0. I tried on 1.39.0 aswell. Ghost is the newest from SVN

Profforg

  • Average Member
  • ***
  • Posts: 187
  • Karma: +23/-27
    • View Profile
Re: Can't compile ghost
« Reply #1 on: February 06, 2015, 11:30:44 am »
Try to change in Makefile

-DBOOST_FILESYSTEM=VERSION=3

to

-DBOOST_FILESYSTEM=VERSION=2
I'm offering most advanced Warcraft 3 bot hosting.

Feel free to contact me:
E-Mail: admin@rusdota.net

czacha994

  • Newbie
  • *
  • Posts: 5
  • Karma: +1/-0
    • View Profile
Re: Can't compile ghost
« Reply #2 on: February 06, 2015, 11:59:13 am »
That fixed the string error, thanks :D

Now new problem:

Code: [Select]
g++ -o ghostdbmysql.o  -O3 -DBOOST_FILESYSTEM=2 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c ghostdbmysql.cpp
In file included from /usr/local/include/boost/thread/detail/platform.hpp:17:0,
                 from /usr/local/include/boost/thread/thread.hpp:12,
                 from /usr/local/include/boost/thread.hpp:13,
                 from ghostdbmysql.cpp:36:
/usr/local/include/boost/config/requires_threads.hpp:29:4: error: #error "Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS"
 #  error "Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS"
    ^
In file included from /usr/local/include/boost/thread/thread.hpp:12:0,
                 from /usr/local/include/boost/thread.hpp:13,
                 from ghostdbmysql.cpp:36:
/usr/local/include/boost/thread/detail/platform.hpp:67:9: error: #error "Sorry, no boost threads are available for this platform."
 #       error "Sorry, no boost threads are available for this platform."
         ^
In file included from /usr/local/include/boost/thread.hpp:13:0,
                 from ghostdbmysql.cpp:36:
/usr/local/include/boost/thread/thread.hpp:19:2: error: #error "Boost threads unavailable on this platform"
 #error "Boost threads unavailable on this platform"
  ^
In file included from /usr/local/include/boost/thread/detail/thread.hpp:11:0,
                 from /usr/local/include/boost/thread/thread.hpp:22,
                 from /usr/local/include/boost/thread.hpp:13,
                 from ghostdbmysql.cpp:36:
/usr/local/include/boost/thread/mutex.hpp:18:2: error: #error "Boost threads unavailable on this platform"
 #error "Boost threads unavailable on this platform"
  ^
In file included from /usr/local/include/boost/thread/detail/thread.hpp:13:0,
                 from /usr/local/include/boost/thread/thread.hpp:22,
                 from /usr/local/include/boost/thread.hpp:13,
                 from ghostdbmysql.cpp:36:
/usr/local/include/boost/thread/detail/thread_heap_alloc.hpp:19:2: error: #error "Boost threads unavailable on this platform"
 #error "Boost threads unavailable on this platform"
  ^
In file included from /usr/local/include/boost/thread/detail/thread_group.hpp:9:0,
                 from /usr/local/include/boost/thread/thread.hpp:24,
                 from /usr/local/include/boost/thread.hpp:13,
                 from ghostdbmysql.cpp:36:
/usr/local/include/boost/thread/shared_mutex.hpp:18:2: error: #error "Boost threads unavailable on this platform"
 #error "Boost threads unavailable on this platform"
  ^
In file included from /usr/local/include/boost/thread.hpp:14:0,
                 from ghostdbmysql.cpp:36:
/usr/local/include/boost/thread/condition_variable.hpp:18:2: error: #error "Boost threads unavailable on this platform"
 #error "Boost threads unavailable on this platform"
  ^
In file included from /usr/local/include/boost/thread.hpp:17:0,
                 from ghostdbmysql.cpp:36:
/usr/local/include/boost/thread/once.hpp:18:2: error: #error "Boost threads unavailable on this platform"
 #error "Boost threads unavailable on this platform"
  ^
In file included from /usr/local/include/boost/thread.hpp:18:0,
                 from ghostdbmysql.cpp:36:
/usr/local/include/boost/thread/recursive_mutex.hpp:18:2: error: #error "Boost threads unavailable on this platform"
 #error "Boost threads unavailable on this platform"
  ^
In file included from /usr/include/pthread.h:24:0,
                 from /usr/include/x86_64-linux-gnu/c++/4.8/bits/gthr-default.h:35,
                 from /usr/include/x86_64-linux-gnu/c++/4.8/bits/gthr.h:148,
                 from /usr/include/c++/4.8/ext/atomicity.h:35,
                 from /usr/include/c++/4.8/bits/ios_base.h:39,
                 from /usr/include/c++/4.8/ios:42,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from includes.h:34,
                 from ghost.h:24,
                 from ghostdbmysql.cpp:23:
/usr/local/include/boost/thread/xtime.hpp:23:5: error: expected identifier before numeric constant
     TIME_UTC=1
     ^
/usr/local/include/boost/thread/xtime.hpp:23:5: error: expected ‘}’ before numeric constant
/usr/local/include/boost/thread/xtime.hpp:23:5: error: expected unqualified-id before numeric constant
In file included from /usr/local/include/boost/thread/detail/thread.hpp:12:0,
                 from /usr/local/include/boost/thread/thread.hpp:22,
                 from /usr/local/include/boost/thread.hpp:13,
                 from ghostdbmysql.cpp:36:
/usr/local/include/boost/thread/xtime.hpp:46:14: error: expected type-specifier before ‘system_time’
     operator system_time() const
              ^
In file included from /usr/local/include/boost/thread/detail/thread.hpp:12:0,
                 from /usr/local/include/boost/thread/thread.hpp:22,
                 from /usr/local/include/boost/thread.hpp:13,
                 from ghostdbmysql.cpp:36:
/usr/local/include/boost/thread/xtime.hpp: In function ‘int xtime_get(xtime*, int)’:
/usr/local/include/boost/thread/xtime.hpp:73:40: error: ‘get_system_time’ was not declared in this scope
         *xtp=get_xtime(get_system_time());
                                        ^
/usr/local/include/boost/thread/xtime.hpp:73:40: note: suggested alternative:
In file included from /usr/local/include/boost/thread/xtime.hpp:14:0,
                 from /usr/local/include/boost/thread/detail/thread.hpp:12,
                 from /usr/local/include/boost/thread/thread.hpp:22,
                 from /usr/local/include/boost/thread.hpp:13,
                 from ghostdbmysql.cpp:36:
/usr/local/include/boost/thread/thread_time.hpp:18:24: note:   ‘boost::get_system_time’
     inline system_time get_system_time()
                        ^
In file included from /usr/local/include/boost/thread/detail/thread.hpp:12:0,
                 from /usr/local/include/boost/thread/thread.hpp:22,
                 from /usr/local/include/boost/thread.hpp:13,
                 from ghostdbmysql.cpp:36:
/usr/local/include/boost/thread/xtime.hpp: At global scope:
/usr/local/include/boost/thread/xtime.hpp:88:1: error: expected declaration before ‘}’ token
 } // namespace boost
 ^
make: *** [ghostdbmysql.o] Error 1

I really want to set Ghost++ bot on my VPS. But the https://www.ghostpp.com/forum/index.php?topic=346.0 gives me errors :(



EDIT:
I reinstalled whole vps and do it combining 2 instructions. Now i think it compiles without errors. I don't see any at least.
Code: [Select]
g++ -o bncsutilinterface.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c bncsutilinterface.cpp
g++ -o bnet.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c bnet.cpp
g++ -o bnetprotocol.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c bnetprotocol.cpp
g++ -o bnlsclient.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c bnlsclient.cpp
g++ -o bnlsprotocol.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c bnlsprotocol.cpp
g++ -o commandpacket.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c commandpacket.cpp
g++ -o config.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c config.cpp
g++ -o crc32.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c crc32.cpp
g++ -o csvparser.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c csvparser.cpp
g++ -o game.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c game.cpp
g++ -o game_admin.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c game_admin.cpp
g++ -o game_base.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c game_base.cpp
g++ -o gameplayer.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c gameplayer.cpp
g++ -o gameprotocol.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c gameprotocol.cpp
g++ -o gameslot.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c gameslot.cpp
g++ -o ghost.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c ghost.cpp
g++ -o ghostdb.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c ghostdb.cpp
g++ -o ghostdbmysql.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c ghostdbmysql.cpp
g++ -o ghostdbsqlite.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c ghostdbsqlite.cpp
g++ -o gpsprotocol.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c gpsprotocol.cpp
g++ -o language.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c language.cpp
g++ -o map.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c map.cpp
g++ -o packed.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c packed.cpp
g++ -o replay.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c replay.cpp
g++ -o savegame.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c savegame.cpp
g++ -o sha1.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c sha1.cpp
g++ -o socket.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c socket.cpp
g++ -o stats.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c stats.cpp
g++ -o statsdota.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c statsdota.cpp
g++ -o statsw3mmd.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c statsw3mmd.cpp
g++ -o util.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c util.cpp
gcc -o sqlite3.o  -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c sqlite3.c
g++ -o ./ghost++ bncsutilinterface.o bnet.o bnetprotocol.o bnlsclient.o bnlsprotocol.o commandpacket.o config.o crc32.o csvparser.o game.o game_admin.o game_base.o gameplayer.o gameprotocol.o gameslot.o ghost.o ghostdb.o ghostdbmysql.o ghostdbsqlite.o gpsprotocol.o language.o map.o packed.o replay.o savegame.o sha1.o socket.o stats.o statsdota.o statsw3mmd.o util.o sqlite3.o -L. -L../bncsutil/src/bncsutil/ -L../StormLib/stormlib/ -lbncsutil -lpthread -ldl -lz -lStorm -lmysqlclient_r -lboost_date_time -lboost_thread -lboost_system -lboost_filesystem -lgmp -lrt
And im getting errors
Code: [Select]
[GHOST] acting as Warcraft III: The Frozen Throne
[CONFIG] warning - unable to read file [language.cfg]
[GHOST] found battle.net connection #1 for server [europe.battle.net]
[GHOST] unable to get system locale, using default locale of 1033
[GHOST] loading MPQ file [./War3Patch.mpq]
[GHOST] extracting Scripts\common.j from MPQ file to [../mapcfgs/common.j]
[b][UTIL] warning - unable to write file [../mapcfgs/common.j][/b]
[GHOST] extracting Scripts\blizzard.j from MPQ file to [../mapcfgs/blizzard.j]
[UTIL] warning - unable to write file [../mapcfgs/blizzard.j]
[GHOST] adding ".cfg" to default map -> new default is [wormwar.cfg]
[CONFIG] warning - unable to read file [../mapcfgs/wormwar.cfg]
[MAP] warning - unable to load MPQ file [../maps/]
[MAP] no map data available, using config file for map_size, map_info, map_crc, map_sha1
[MAP] no map data available, using config file for map_options, map_width, map_height, map_slot<x>, map_numplayers, map_numteams
[MAP] invalid map_path detected
[MAP] invalid map_size detected
[MAP] invalid map_info detected
[MAP] invalid map_crc detected
[MAP] invalid map_sha1 detected
[MAP] invalid map_width detected
[MAP] invalid map_height detected
[MAP] invalid map_numplayers detected
[MAP] invalid map_numteams detected
[MAP] invalid map_slot<x> detected
[GHOST] using hardcoded admin game map
[MAP] using hardcoded Emerald Gardens map data for Warcraft 3 version 1.24 & 1.24b
I put my war3patch in ~/ghost/ folder
« Last Edit: February 07, 2015, 04:20:55 am by czacha994 »

czacha994

  • Newbie
  • *
  • Posts: 5
  • Karma: +1/-0
    • View Profile
Re: Can't compile ghost
« Reply #3 on: February 07, 2015, 10:29:02 am »
I managed to fix all errors. Everything is working fine ^^

pasted this instead
bot_war3path = war3/
bot_mapcfgpath = mapcfgs/
bot_savegamepath = savegames/
bot_mappath = maps/
bot_replaypath = replays/
and i throw 4 files that ghost need to war3