Author Topic: Trunk compilation issues  (Read 1095 times)

PolitikerNEU

  • Guest
Trunk compilation issues
« on: 17 September 2009, 11:32:42 »
Hello, I got the following erros when I tried to compile glestae trunk:
Quote
glest_game/game/script_manager.cpp: In static member function »static int Glest::Game::ScriptManager::debugLog(Shared::Lua::LuaHandle*)«:
glest_game/game/script_manager.cpp:292: Fehler: ungültige Initialisierung einer nicht-konstanten Referenz des Typs »std::string&« von temporärem Wert des Typs »std::string«
glest_game/game/script_manager.cpp: In static member function »static int Glest::Game::ScriptManager::consoleMsg(Shared::Lua::LuaHandle*)«:
glest_game/game/script_manager.cpp:309: Fehler: ungültige Initialisierung einer nicht-konstanten Referenz des Typs »std::string&« von temporärem Wert des Typs »std::string«
which are translated to about:
Quote
glest_game/game/script_manager.cpp: In static member function »static int Glest::Game::ScriptManager::debugLog(Shared::Lua::LuaHandle*)«:
glest_game/game/script_manager.cpp:292: Error: invalid initialisation of a non-const reference of the type »std::string&« with the temporary value of the type »std::string«
glest_game/game/script_manager.cpp: In static member function »static int Glest::Game::ScriptManager::consoleMsg(Shared::Lua::LuaHandle*)«:
glest_game/game/script_manager.cpp:309: Error: invalid initialisation of a non-const reference of the type »std::string&« with the temporary value of the type »std::string«

This can be fixed by replacing
Code: [Select]
string &msg = ... by
Code: [Select]
const string &msg = ...

hailstone

  • Local Moderator
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: Trunk compilation issues
« Reply #1 on: 17 September 2009, 12:38:51 »
It compiles fine for me using VS, are you using Linux?
« Last Edit: 17 September 2009, 12:41:40 by hailstone »
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

PolitikerNEU

  • Guest
Re: Trunk compilation issues
« Reply #2 on: 17 September 2009, 13:32:15 »
yes

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Trunk compilation issues
« Reply #3 on: 18 September 2009, 01:12:29 »
Yeah, VS lets you do all sorts of things that it shouldn't.

Thanks PolitikerNEU.
Glest Advanced Engine - Code Monkey

Timeline | Downloads

 

anything