Jump to content


Photo

Compiling Problems In Opensuse 11, V 1062


  • Please log in to reply
7 replies to this topic

#1 Soros

Soros

    Squaddie

  • Forum Members
  • PipPip
  • 9 posts

Posted 03 September 2008 - 05:39 AM

Hi!!
I'm compiling UFO2000-0.7.1062 in openSUSE 11. After getting some problems that I solved installing the HawkNL and DUMB libraries from the sources, I get the following error that I cannot get rid of.

[codebox]g++ -MMD -funsigned-char -Wall -Wno-deprecated-declarations -I src/lua -I src/luasqlite3 -DDEBUGMODE -DUFO_SVNVERSION=\"exportado\" -O2 -pipe -I/usr/include/freetype2 -DHAVE_FREETYPE -DGLYPH_TARGET=GLYPH_TARGET_ALLEGRO -DGK_NO_LEGACY -DHAVE_DUMBOGG -DHAVE_PNG -DLINUX -I/usr/include -c src/bullet.cpp -o obj/bullet.o
In file included from src/stdafx.h:99,
from src/bullet.cpp:22:
src/LuaPlus/LuaPlusCD.h: In function ?void LPCD::Push(lua_State*, T*)?:
src/LuaPlus/LuaPlusCD.h:57: error: must #include <typeinfo> before using typeid
make: *** [obj/bullet.o] Error 1[/codebox]
I have no idea about what can be failing. Can you help me?
Soros

Edited by Soros, 03 September 2008 - 05:40 AM.


#2 Plouj

Plouj

    Squaddie

  • Forum Members
  • PipPip
  • 7 posts

Posted 18 September 2008 - 07:19 PM

Yeah. Just add this line:

#include <typeinfo>
near the top of src/LuaPlus/LuaPlusCD.h.
For example:
...
}

#include <string.h>
#include <typeinfo>

// LuaPlus Call Dispatcher													 
namespace LPCD
...
This fixed the problem for me on Fedora 9. I wonder why people didn't notice this on other systems.

#3 Soros

Soros

    Squaddie

  • Forum Members
  • PipPip
  • 9 posts

Posted 21 September 2008 - 09:57 AM

Hey, Thank you Plouj. That solved the problem... but another one came after that:

[codebox]g++ -MMD -funsigned-char -Wall -Wno-deprecated-declarations -I src/lua -I src/luasqlite3 -DDEBUGMODE -DUFO_SVNVERSION=\"exportado\" -O2 -pipe -I/usr/include/freetype2 -DHAVE_FREETYPE -DGLYPH_TARGET=GLYPH_TARGET_ALLEGRO -DGK_NO_LEGACY -DHAVE_DUMBOGG -DHAVE_PNG -DLINUX -I/usr/include -c src/server_transport.cpp -o obj/server_transport.o
src/server_transport.cpp: In member function ?bool ClientServer::connect(const std::string&, const std::string&, const std::string&, std::string&)?:
src/server_transport.cpp:375: error: ?getenv? was not declared in this scope
make: *** [obj/server_transport.o] Error 1[/codebox]

Any idea about this topic?

Thanks,
Soros

#4 Plouj

Plouj

    Squaddie

  • Forum Members
  • PipPip
  • 7 posts

Posted 21 September 2008 - 03:17 PM

Hey, Thank you Plouj. That solved the problem... but another one came after that:

g++ -MMD -funsigned-char -Wall -Wno-deprecated-declarations -I src/lua -I src/luasqlite3 -DDEBUGMODE -DUFO_SVNVERSION=\"exportado\" -O2 -pipe -I/usr/include/freetype2 -DHAVE_FREETYPE -DGLYPH_TARGET=GLYPH_TARGET_ALLEGRO -DGK_NO_LEGACY -DHAVE_DUMBOGG -DHAVE_PNG -DLINUX -I/usr/include -c src/server_transport.cpp -o obj/server_transport.osrc/server_transport.cpp: In member function ?bool ClientServer::connect(const std::string&, const std::string&, const std::string&, std::string&)?:src/server_transport.cpp:375: error: ?getenv? was not declared in this scopemake: *** [obj/server_transport.o] Error 1

Any idea about this topic?

Thanks,
Soros


Yes. I also had to fix this problem on my Fedora 9 system. The manual for getenv (`man getenv`) says that you should add "#include <stdlib.h>" near the top of src/server_transport.cpp.

#5 Soros

Soros

    Squaddie

  • Forum Members
  • PipPip
  • 9 posts

Posted 27 September 2008 - 02:50 AM

BINGO!! ^_^
Thank you very much, Plouj. That solved my problem and although it wasn't the last one, I could compile the program with some options: make no_dumbogg=1 no_ttf=1.

Despite these options, I haven't found any difference. In what do they affect the game?

Soros

#6 Plouj

Plouj

    Squaddie

  • Forum Members
  • PipPip
  • 7 posts

Posted 27 September 2008 - 09:17 AM

I don't know for sure what will be different. I guess that the game won't be able to play sounds in the OGG format and display TrueType fonts. I've only played the game for 10 minutes and did not get a chance to verify this. I got distracted by a different turn based strategy game - Wesnoth.

#7 Kratos

Kratos

    UFO2000 Staff

  • Moderators
  • PipPipPipPipPip
  • 4,113 posts

Posted 27 September 2008 - 10:10 PM

I forget if UFO2000 sponges off of X-com's sound engine or not. I do know it doesn't have it's own audio engine of any kind. For certain though, no music (there are a few more than just OGG the DUMB library helps with I think), and no TTF fonts. Of course, it's only a minor set back when playing the game.

Edited by Kratos, 27 September 2008 - 11:14 PM.


#8 Soros

Soros

    Squaddie

  • Forum Members
  • PipPip
  • 9 posts

Posted 02 October 2008 - 03:42 PM

Yeah. If I use the original game, UFO:Enemy Unknown, as part of UFO 2000 everything is all right. However, if I do not use it, the game seems to be a bit weird.

Soros