Page 1 of 1

Archlinux Compilation Problem (C++ Related?)

Posted: Fri Feb 01, 2008 12:40 pm
by link2009
Hey LE, I'm having a little problem compiling the latest source on Archlinux, is it the distro or a coding error?

Code: Select all

   1.
      In file included from ../common/DataBuffer.h:28,
   2.
                       from Commands.h:22,
   3.
                       from zoneserver.cpp:29:
   4.
      ../common/../World/SpawnLists.h: In member function ‘void SpawnCommandList::SetCommands(SpawnCommandList*)’:
   5.
      ../common/../World/SpawnLists.h:56: warning: cast from type ‘const char*’ to type ‘char*’ casts away constness
   6.
      ../common/../World/SpawnLists.h:56: warning: cast from type ‘const char*’ to type ‘char*’ casts away constness
   7.
      In file included from Commands.h:22,
   8.
                       from zoneserver.cpp:29:
   9.
      ../common/DataBuffer.h: In member function ‘void DataBuffer::AddDataCommandList(SpawnCommandList*)’:
  10.
      ../common/DataBuffer.h:221: warning: comparison between signed and unsigned integer expressions
  11.
      In file included from zoneserver.cpp:53:
  12.
      ../common/servertalk.h: In member function ‘std::string TableQuery::GetQueriesString()’:
  13.
      ../common/servertalk.h:381: warning: comparison between signed and unsigned integer expressions
  14.
      ../common/servertalk.h: In destructor ‘TableDataQuery::~TableDataQuery()’:
  15.
      ../common/servertalk.h:460: warning: comparison between signed and unsigned integer expressions
  16.
      In file included from WorldDatabase.h:32,
  17.
                       from zoneserver.cpp:55:
  18.
      ../common/database.h: In member function ‘char* Query::GetQuery()’:
  19.
      ../common/database.h:87: warning: cast from type ‘const char*’ to type ‘char*’ casts away constness
  20.
      In file included from zoneserver.h:32,
  21.
                       from client.h:26,
  22.
                       from WorldDatabase.h:36,
  23.
                       from zoneserver.cpp:55:
  24.
      net.h: In member function ‘char* ZoneAuthRequest::GetCharacterName()’:
  25.
      net.h:104: warning: cast from type ‘const char*’ to type ‘char*’ casts away constness
  26.
      In file included from ../common/ConfigReader.h:23,
  27.
                       from Spawn.h:33,
  28.
                       from Player.h:23,
  29.
                       from zoneserver.h:33,
  30.
                       from client.h:26,
  31.
                       from WorldDatabase.h:36,
  32.
                       from zoneserver.cpp:55:
  33.
      ../common/PacketStruct.h: In member function ‘void PacketStruct::setArrayAddToPacketByName(char*, bool, int16, int16)’:
  34.
      ../common/PacketStruct.h:159: warning: cast from type ‘const char*’ to type ‘char*’ casts away constness
  35.
      ../common/PacketStruct.h: In member function ‘char* PacketStruct::GetName()’:
  36.
      ../common/PacketStruct.h:352: warning: cast from type ‘const char*’ to type ‘char*’ casts away constness
  37.
      zoneserver.h: In constructor ‘ZoneServer::ZoneServer(char*)’:
  38.
      zoneserver.h:171: warning: ‘ZoneServer::shutdownTimer’ will be initialized after
  39.
      zoneserver.h:165: warning:   ‘Timer ZoneServer::movement_timer’
  40.
      zoneserver.cpp:89: warning:   when initialized here
  41.
      zoneserver.h:165: warning: ‘ZoneServer::movement_timer’ will be initialized after
  42.
      zoneserver.h:143: warning:   ‘Timer ZoneServer::regenTimer’
  43.
      zoneserver.cpp:89: warning:   when initialized here
  44.
      zoneserver.h:170: warning: ‘ZoneServer::charsheet_changes’ will be initialized after
  45.
      zoneserver.h:169: warning:   ‘Timer ZoneServer::client_save’
  46.
      zoneserver.cpp:89: warning:   when initialized here
  47.
      zoneserver.h:169: warning: ‘ZoneServer::client_save’ will be initialized after
  48.
      zoneserver.h:167: warning:   ‘Timer ZoneServer::spawn_check_remove’
  49.
      zoneserver.cpp:89: warning:   when initialized here
  50.
      zoneserver.cpp: In member function ‘void ZoneServer::CheckRemoveSpawnFromClient()’:
  51.
      zoneserver.cpp:184: warning: unused variable ‘index’
  52.
      zoneserver.cpp: In member function ‘Spawn* ZoneServer::FindSpawn(Player*, char*)’:
  53.
      zoneserver.cpp:290: error: ‘stricmp’ was not declared in this scope
  54.
      zoneserver.cpp: In member function ‘void ZoneServer::HandleChatMessage(Client*, char*, int16, char*, float, char*)’:
  55.
      zoneserver.cpp:419: warning: deprecated conversion from string constant to ‘char*’
  56.
      zoneserver.cpp:422: warning: deprecated conversion from string constant to ‘char*’
  57.
      zoneserver.cpp:424: warning: deprecated conversion from string constant to ‘char*’
  58.
      zoneserver.cpp:425: warning: deprecated conversion from string constant to ‘char*’
  59.
      zoneserver.cpp:427: warning: deprecated conversion from string constant to ‘char*’
  60.
      zoneserver.cpp:429: warning: deprecated conversion from string constant to ‘char*’
  61.
      zoneserver.cpp:430: warning: deprecated conversion from string constant to ‘char*’
  62.
      zoneserver.cpp:431: warning: deprecated conversion from string constant to ‘char*’
  63.
      zoneserver.cpp:432: warning: deprecated conversion from string constant to ‘char*’
  64.
      zoneserver.cpp:433: warning: deprecated conversion from string constant to ‘char*’
  65.
      zoneserver.cpp:435: warning: deprecated conversion from string constant to ‘char*’
  66.
      zoneserver.cpp: In member function ‘void ZoneServer::SendRemoveSpawn(Client*, Spawn*, PacketStruct*)’:
  67.
      zoneserver.cpp:650: warning: deprecated conversion from string constant to ‘char*’
  68.
      zoneserver.cpp:654: warning: deprecated conversion from string constant to ‘char*’
  69.
      zoneserver.cpp: In member function ‘void ZoneServer::RemoveSpawn(Spawn*, bool)’:
  70.
      zoneserver.cpp:662: warning: unused variable ‘outapp’
  71.
      zoneserver.cpp: In member function ‘void ZoneServer::SendCalculatedXP(Player*, Spawn*)’:
  72.
      zoneserver.cpp:678: warning: deprecated conversion from string constant to ‘char*’
  73.
      zoneserver.cpp: In member function ‘void ZoneServer::KillSpawn(Spawn*, Spawn*)’:
  74.
      zoneserver.cpp:706: warning: deprecated conversion from string constant to ‘char*’
  75.
      zoneserver.cpp:710: warning: deprecated conversion from string constant to ‘char*’
  76.
      zoneserver.cpp:711: warning: deprecated conversion from string constant to ‘char*’
  77.
      zoneserver.cpp: In member function ‘void ZoneServer::SendDamagePacket(Spawn*, Spawn*, int8, int8, int8, int16, char*)’:
  78.
      zoneserver.cpp:749: warning: deprecated conversion from string constant to ‘char*’
  79.
      zoneserver.cpp:752: warning: deprecated conversion from string constant to ‘char*’
  80.
      zoneserver.cpp:756: warning: deprecated conversion from string constant to ‘char*’
  81.
      zoneserver.cpp:762: warning: deprecated conversion from string constant to ‘char*’
  82.
      zoneserver.cpp:765: warning: deprecated conversion from string constant to ‘char*’
  83.
      zoneserver.cpp:769: warning: deprecated conversion from string constant to ‘char*’
  84.
      zoneserver.cpp:779: warning: deprecated conversion from string constant to ‘char*’
  85.
      zoneserver.cpp:779: warning: deprecated conversion from string constant to ‘char*’
  86.
      zoneserver.cpp:780: warning: deprecated conversion from string constant to ‘char*’
  87.
      zoneserver.cpp:780: warning: deprecated conversion from string constant to ‘char*’
  88.
      zoneserver.cpp:781: warning: deprecated conversion from string constant to ‘char*’
  89.
      zoneserver.cpp:781: warning: deprecated conversion from string constant to ‘char*’
  90.
      zoneserver.cpp:782: warning: deprecated conversion from string constant to ‘char*’
  91.
      zoneserver.cpp:782: warning: deprecated conversion from string constant to ‘char*’
  92.
      zoneserver.cpp:783: warning: deprecated conversion from string constant to ‘char*’
  93.
      zoneserver.cpp:784: warning: deprecated conversion from string constant to ‘char*’
  94.
      zoneserver.cpp:786: warning: deprecated conversion from string constant to ‘char*’
  95.
      zoneserver.cpp: In member function ‘void ZoneServer::SendCastSpellPacket(int32, int32)’:
  96.
      zoneserver.cpp:807: warning: deprecated conversion from string constant to ‘char*’
  97.
      zoneserver.cpp:811: warning: deprecated conversion from string constant to ‘char*’
  98.
      zoneserver.cpp:812: warning: deprecated conversion from string constant to ‘char*’
  99.
      zoneserver.cpp:813: warning: deprecated conversion from string constant to ‘char*’
 100.
      zoneserver.cpp:814: warning: deprecated conversion from string constant to ‘char*’
 101.
      zoneserver.cpp:815: warning: deprecated conversion from string constant to ‘char*’
 102.
      zoneserver.cpp: In member function ‘EQ2Packet* ZoneServer::GetZoneInfoPacket(Client*)’:
 103.
      zoneserver.cpp:880: warning: deprecated conversion from string constant to ‘char*’
 104.
      zoneserver.cpp:881: warning: deprecated conversion from string constant to ‘char*’
 105.
      zoneserver.cpp:882: warning: deprecated conversion from string constant to ‘char*’
 106.
      zoneserver.cpp:883: warning: deprecated conversion from string constant to ‘char*’
 107.
      zoneserver.cpp:883: warning: deprecated conversion from string constant to ‘char*’
 108.
      zoneserver.cpp:884: warning: deprecated conversion from string constant to ‘char*’
 109.
      zoneserver.cpp:885: warning: deprecated conversion from string constant to ‘char*’
 110.
      zoneserver.cpp:885: warning: deprecated conversion from string constant to ‘char*’
 111.
      zoneserver.cpp:886: warning: deprecated conversion from string constant to ‘char*’
 112.
      zoneserver.cpp:886: warning: deprecated conversion from string constant to ‘char*’
 113.
      zoneserver.cpp:887: warning: cast from type ‘const char*’ to type ‘char*’ casts away constness
 114.
      zoneserver.cpp:887: warning: deprecated conversion from string constant to ‘char*’
 115.
      zoneserver.cpp:888: warning: cast from type ‘const char*’ to type ‘char*’ casts away constness
 116.
      zoneserver.cpp:888: warning: deprecated conversion from string constant to ‘char*’
 117.
      zoneserver.cpp:889: warning: cast from type ‘const char*’ to type ‘char*’ casts away constness
 118.
      zoneserver.cpp:889: warning: deprecated conversion from string constant to ‘char*’
 119.
      zoneserver.cpp:890: warning: deprecated conversion from string constant to ‘char*’
 120.
      zoneserver.cpp:893: warning: deprecated conversion from string constant to ‘char*’
 121.
      zoneserver.cpp:895: warning: deprecated conversion from string constant to ‘char*’
 122.
      zoneserver.cpp:896: warning: deprecated conversion from string constant to ‘char*’
 123.
      zoneserver.cpp:897: warning: deprecated conversion from string constant to ‘char*’
 124.
      ../common/PacketStruct.h: In member function ‘void PacketStruct::setSubstructDataByName(char*, char*, Data, int16, int16) [with Data = unsigned char]’:
 125.
      zoneserver.cpp:779:   instantiated from here
 126.
      ../common/PacketStruct.h:123: warning: cast from type ‘const char*’ to type ‘char*’ casts away constness
 127.
      ../common/PacketStruct.h: In member function ‘void PacketStruct::setSubstructDataByName(char*, char*, Data, int16, int16) [with Data = unsigned int]’:
 128.
      zoneserver.cpp:781:   instantiated from here
 129.
      ../common/PacketStruct.h:123: warning: cast from type ‘const char*’ to type ‘char*’ casts away constness
 130.
      make: *** [zoneserver.o] Error 1

Posted: Fri Feb 01, 2008 2:44 pm
by LethalEncounter
It will be fixed this weekend.

Posted: Fri Feb 01, 2008 3:27 pm
by link2009
Alright, but could you keep me updated and tell me what the problem was? I'm always eager to know solutions to problems.

Posted: Fri Feb 01, 2008 4:10 pm
by LethalEncounter

Code: Select all

zoneserver.cpp:290: error: ‘stricmp’ was not declared in this scope 
Linux doesnt have that function, it was a Windows only function that was included by mistak.

Posted: Fri Feb 01, 2008 8:43 pm
by link2009
So then commenting it out should be good? I'll give it a go anyway ;).
Edit: Muaha, I noticed that strcmp was actually a WIN32 reference, so I just changed it strcasecmp. I'm good to go :D.