Page 6 of 20

Posted: Tue Jan 20, 2004 10:19 pm
by noelte
noelte wrote:While clicking around i stumbled over a bug (or todo) in
FleetDetailPanel::ShipDroppedIntoList where m_create_new_fleet_sig
(ship_id) causes a crash.
Very funny, finally i managed to build freeorion with MSVC.NET 7.1
and now this crash is gone. :wink:

Ronald.

Posted: Tue Jan 20, 2004 10:25 pm
by Paul1980au
That must be a real pain having it crash like that. Let us know when you get it back up.

Posted: Wed Jan 21, 2004 9:18 am
by noelte
Paul1980au wrote:... Let us know when you get it back up.
Sorry, I don't understand you. Freeorion isn't crashing anymore.
Maybe only the Dev-C++ build was buggy. With MSVC.Net it works
very well.

Ronald.

Posted: Mon Feb 23, 2004 12:04 pm
by Marijn
This may have been covered somewhere in this thread, but a few pages were quite unreadable due to too long lines (mods, you might want to shorten those, the board does NOT seem to handle them well), but is there a straightforward way of compiling the project on windows *without* using dev-cpp? I tried with cygwin using autogen.sh, but it messes up - I do have all required tools an scripts, but I get funny things like:

aclocal: configure.ac: 99: macro `AM_PATH_SDL' not found in library
aclocal: configure.ac: 102: macro `AM_PATH_SDL' not found in library

And i have NO idea which library he is talking about (tried exporting AM_PATH_SDL as an environment variable, no luck).

Posted: Mon Feb 23, 2004 12:22 pm
by noelte
Marijn wrote: ... but is there a straightforward way of compiling the project on windows *without* using dev-cpp?.
Yes, there is a way 8)

But first you should get Dev-cpp to work. If you checkout the sources and follow hints in WindowsKit.zip, you will make it.

With dev-cpp you will be able to build the sources, but at least i couldn't debug.

Ronald.

Posted: Mon Feb 23, 2004 2:24 pm
by Tyreth
Sounds like you are missing SDL perhaps? - http://www.libsdl.org

Posted: Tue Feb 24, 2004 8:45 am
by Marijn
Nah, I had SDL, those automake/autoconfig tools just did not realize it. I ended up just adapting the linux makefiles I found in /server, /client/human and /client/ai for my system and it works fine now. Well, except for the fact that the server crashes when a client connects. I'm looking for the cause of that right now, going through the code looking for bugs is always a good way to get to know a piece of code.

Marijn

Posted: Tue Feb 24, 2004 2:21 pm
by Yoghurt
Marijn wrote:aclocal: configure.ac: 99: macro `AM_PATH_SDL' not found in library
aclocal: configure.ac: 102: macro `AM_PATH_SDL' not found in library

And i have NO idea which library he is talking about (tried exporting AM_PATH_SDL as an environment variable, no luck).
autogen is trying to build the configure script itself, for which you would need some m4-macros which are included in the unix SDL-devel packages.

The easiest way to get it working is to call the "update-configure" script (instead of autogen) from within mingw, it should download (if you have wget installed) the needed files for you. If you don't have wget installed, you can download the needed files yourself (update-configure will tell you so)

Afterwards, running configure should work. If you have any problems, post me a PM, I'm the one responsible for this autotools-stuff.

BTW: I didn't manage yet to get the buildsystem working on MinGW, so bug reports are welcome.

Compiling

Posted: Tue Mar 16, 2004 11:20 pm
by OrionGuardian
Hello all, i've been watching the lastest 4x games and as i didn't particularily like them as much as moo2, so i started searching for alternatives, and so I found FreeOrion, and of course I wanted to help right away :D I have little C++ experience (i nice way to say I'm a noob) but i'd like to help with it's programming.

So i got the Binary FreeOrion 0.1 version and I installed the source alongside, just to see if i could compile it (I know it's old but i have to make sure compiler errors aren't due to the lastest instable version)

But i've been having trouble compiling, but I didn't find a problem like mine on this forum, so i wonder if someone could tell me what am I doing wrong?

I'm on Windows XP, and using Dev-C++ version 4.9.8.7 with most updates installed, except DevPaks, and here's what I did and what happened:

1- I copy the source that came with binary to C:\FO

2-I followed the instructions on the included (old) WindowsKit.zip, installed boost, log4cpp, GG headers and dlls into their respective places.

3-I change the Project Options Include Paths so they point to the right places on my system.

4-It's all fine and well until I try to compile Server.dev. The compiler immediatly gives an error about MakeFile.win and i find that file with 0 bytes on the server folder. There is only one way around this:

5-I try to complile HumanClient.dev before Server.dev, and about halfway it gives the following error (on HumanClient.dev) :

Code: Select all

808 C:\FO\server\ServerApp.cpp
no matching function for call to `GG::XMLElement::XMLElement (std::basic_string<char, std::char_traits<char>, std::allocator<char> >, 
227 C:\FO\GG\include\XMLDoc.h
candidates are: GG::XMLElement::XMLElement(const  GG::XMLElement&)
203 C:\FO\GG\include\XMLDoc.h
                GG::XMLElement::XMLElement(const  std::string&, bool)
113 C:\FO\GG\include\XMLDoc.h
                GG::XMLElement::XMLElement(const  std::string&, const std::string&)
112 C:\FO\GG\include\XMLDoc.h
                GG::XMLElement::XMLElement(const  std::string&)
111 C:\FO\GG\include\XMLDoc.h
                GG::XMLElement::XMLElement()
 C:\FO\server\Makefile.win
[Build Error]  [../objs/server/ServerApp.o] Error 1
6- The odd thing is after i get this error, I go back to opening Server.dev and it starts compiling. However, I get another XML error:

Code: Select all

 C:\FO\server\ServerApp.cpp
In member function `void ServerApp::SaveGameVars(GG::XMLDoc&)  const':
808 C:\FO\server\ServerApp.cpp
no matching function for call to `GG::XMLElement::XMLElement (std::basic_string<char, std::char_traits<char>, std::allocator<char> >, 
227 C:\FO\GG\include\XMLDoc.h
candidates are: GG::XMLElement::XMLElement(const  GG::XMLElement&)
203 C:\FO\GG\include\XMLDoc.h
                GG::XMLElement::XMLElement(const  std::string&, bool)
113 C:\FO\GG\include\XMLDoc.h
                GG::XMLElement::XMLElement(const  std::string&, const std::string&)
112 C:\FO\GG\include\XMLDoc.h
                GG::XMLElement::XMLElement(const  std::string&)
111 C:\FO\GG\include\XMLDoc.h
                GG::XMLElement::XMLElement()
7-I tried to compile the new source code with the new WinKit.zip, but I get other (much larger) errors and even worse when I tried the new WinKit.zip on the 0.1 source.

So I wonder if anyone else had these same problems and made it work please enlighten me on what am I missing? Do I need another version of Dev-C++? Which one do you use that works? Or is there anything else i must adjust in Project Options? Am I missing a library? Thanks for reading!

Posted: Wed Mar 17, 2004 1:27 am
by vorenhutz
Did you copy the stuff in windowskit.zip/copy to dev-cpp/ to your dev-cpp directory? I guess you probably did this, but you didn't mention it.

Posted: Wed Mar 17, 2004 1:58 am
by OrionGuardian
yeah i forgot to mention but I did it, i followed exactly what the readme said, i just wonder if i have to download something else? winkit.zip is enough to compile it right? my guess is newer versions of gg, boost etc will make it incompatible with the source so i use all the old included stuff

Posted: Wed Mar 17, 2004 2:10 am
by vorenhutz
Yes, you should be able to compile 0.1 with just the 0.1 source, windowskit, dev-cpp and boost. I did it myself a week or so ago.
Er, actually, now that I think about it, I think the windowskit in the 0.1 source was out of date. Try getting the next version up from CVS :
http://cvs.sourceforge.net/viewcvs.py/* ... p?rev=1.25
I think my mind is going, Dave :)

Posted: Wed Mar 17, 2004 1:07 pm
by tzlaine
Another thing to try is just to copy over your .dev files with the originial ones, and try changing them all over again. DevC++ is a little flaky sometimes, and I've had my .dev files get corrupted, seemingly for no reason. Go figure.

Compiling error

Posted: Thu Apr 01, 2004 6:04 am
by duffy84
Hi!

I'm trying to compile freeorion on a Windows XP machine, but I get the following compiler error:
C:\FreeOrion\network\XLut.cpp
In member function `int XLut::get(int, int)':
80 C:\FreeOrion\network\XLut.cpp
Internal compiler error in delete_insn, at cfgrtl.c:139
C:\FreeOrion\server\Makefile.win
[Build Error] [../objs/server/XLut.o] Error 1

I have done everything as it says in windowskit.zip and I have been able to compile it before. This problem started a few weeks ago, right after ver o.1 was released.

I have allt the latest dll:s and headerfiles for GG and all the other modules.

Does anyone know what the problem is?

/Mathias

Posted: Thu Apr 01, 2004 6:16 am
by vorenhutz
I get something like this too (I guess you're compiling with dev-cpp like me). If you turn off optimisation in the compiler options, it should compile.
Since the problem is with gcc, I tried to update mingw to the latest (it uses gcc 3.3.1 instead of 3.2 I think) and use that to compile instead. Compilation with optimisation works, but the linking fails (in the boost libraries), presumably something to do with the object file format changing from gcc 3.2 -> 3.3.1.
Short answer, if you don't care about optimisation just turn it off. If you want optimisation, good luck, it was too complicated for me ;)