chrber Posted October 10, 2005 Report Share Posted October 10, 2005 Hello, I just want to inform you that ufo2000 SVN can't be compiled without modifications with GCC 4.0.1. There is an error in the server.h file, because of using the class ServerDispatch, before declaring it. GCC 4.0.1 seems to be more strict about this, then GCC 3.* was. Just addingclass ServerDispatch;before the ClientSever class did the trick for me. But I noticed another problem. The header file sqlite3.h is missing. There is no dependancy for sqllite3 stated in the ufo2000 docs, so I assume it's just missing or do I have to install sqllite3? Hope I can help you. Link to comment Share on other sites More sharing options...
Serge Posted October 10, 2005 Report Share Posted October 10, 2005 I just want to inform you that ufo2000 SVN can't be compiled without modifications with GCC 4.0.1.Thanks, when upgrading to next versions of the compiler, sometimes a few tweaks are needed. I can't check gcc 4.x compatibility myself (as gentoo linux does not officially support it yet), so having reports from gcc4 users is the only way to ensure gcc4 compatibility right now There is an error in the server.h file, because of using the class ServerDispatch, before declaring it. GCC 4.0.1 seems to be more strict about this, then GCC 3.* was. Just addingclass ServerDispatch;before the ClientSever class did the trick for me.Thanks, your fix is now committed to SVN Keep reporting if you notice any other problems. But I noticed another problem. The header file sqlite3.h is missing. There is no dependancy for sqllite3 stated in the ufo2000 docs, so I assume it's just missing or do I have to install sqllite3?Actually sqlite3 dependency was added not so long ago. Theoretically, the game itself should not need it at all and it is only intended to be used by the server. We will try to get rid of sqlite3 dependency for client before we release the next stable version, probably because of that the depencency is not documented yet. On the other hand, the game can also be compiled using SCons. Because it uses python, it can provide more flexibility and tries to detect all the needed libraries providing human readable error messages if something is wrong. It can even download precompiled libraries package when compiling in windows using mingw Link to comment Share on other sites More sharing options...
chrber Posted October 11, 2005 Author Report Share Posted October 11, 2005 Okay. I let GCC run further today and it stopped at the file src/dumbogg/dumbogg.c. make gives me the following error message: src/dumbogg/dumbogg.c: In function 'dumb_load_ogg':src/dumbogg/dumbogg.c:160: warning: passing argument 3 of 'make_duh' from incompatible pointer typesrc/dumbogg/dumbogg.c:160: warning: passing argument 4 of 'make_duh' makes integer from pointer without a castsrc/dumbogg/dumbogg.c:160: error: too few arguments to function 'make_duh'src/dumbogg/dumbogg.c: In function 'ogg_sigrenderer_get_samples':src/dumbogg/dumbogg.c:224: warning: implicit declaration of function 'dumb_resample'src/dumbogg/dumbogg.c: In function 'ogg_sigrenderer_get_current_sample':src/dumbogg/dumbogg.c:264: warning: implicit declaration of function 'dumb_resample_get_current_sample'src/dumbogg/dumbogg.c: In function 'ogg_start_sigrenderer':src/dumbogg/dumbogg.c:353: error: too few arguments to function 'dumb_reset_resampler' Link to comment Share on other sites More sharing options...
Serge Posted October 14, 2005 Report Share Posted October 14, 2005 As the compiler complains to the wrong number of arguments to a function, maybe you have a different and not compatible version of DUMB? The game was tested with DUMB 0.9.2. You can also compile the game without music using 'make no_dumbogg=1'. PS. Seems like gcc4 still has a long way before it becomes mature enough to replace gcc3: http://www.coyotegulch.com/reviews/gcc4/ Link to comment Share on other sites More sharing options...
chrber Posted October 14, 2005 Author Report Share Posted October 14, 2005 Okay, I switched from DUMB 0.93 back to DUMB 0.92 and the file compiles fine. But now I got linker errors: obj/random.o: In function `Random::getUniform()':random.cpp:(.text+0x756): undefined reference to `Random::FAC'obj/random.o: In function `Random::getUniform(float, float)':random.cpp:(.text+0x84f): undefined reference to `Random::FAC' Don't know if this is caused by GCC or binutils. Link to comment Share on other sites More sharing options...
Serge Posted November 11, 2005 Report Share Posted November 11, 2005 Fixed in SVN. That was a use of nonstandard gcc extension that was finally removed in gcc4:G++ allows static data members of const floating-point type to be declared with an initializer in a class definition. The standard only allows initializers for static members of const integral types and const enumeration types so this extension has been deprecated and will be removed from a future version. Here is a link for more details.http://gcc.gnu.org/onlinedocs/gcc/Deprecat...ecated-Features Link to comment Share on other sites More sharing options...
Recommended Posts