The Help Thread

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Message
Author
User avatar
The Silent One
Graphics
Posts: 1129
Joined: Tue Jul 01, 2003 8:27 pm

Re: The Help Thread

#241 Post by The Silent One »

After freeoriond.exe compiled successfully, an error occured:

Code: Select all

PythonAI.cpp
AI\PythonAI.cpp(48) : error C2440: 'Initialisierung': 'overloaded-function' kann
nicht in 'const UniverseObject *(__thiscall Universe::* )(int)' konvertiert werden
        Keine Funktion mit diesem Namen im Gültigkeitsbereich stimmt mit dem Zieltyp überein

AI\PythonAI.cpp(49) : error C2440: 'Initialisierung': 'overloaded-function' kann
 nicht in 'const Fleet *(__thiscall Universe::* )(int)' konvertiert werden
        Keine Funktion mit diesem Namen im Gültigkeitsbereich stimmt mit dem Zieltyp überein

AI\PythonAI.cpp(50) : error C2440: 'Initialisierung': 'overloaded-function' kann
 nicht in 'const Ship *(__thiscall Universe::* )(int)' konvertiert werden
        Keine Funktion mit diesem Namen im Gültigkeitsbereich stimmt mit dem Zieltyp überein

AI\PythonAI.cpp(51) : error C2440: 'Initialisierung': 'overloaded-function' kann
 nicht in 'const Planet *(__thiscall Universe::* )(int)' konvertiert werden
        Keine Funktion mit diesem Namen im Gültigkeitsbereich stimmt mit dem Zieltyp überein

AI\PythonAI.cpp(52) : error C2440: 'Initialisierung': 'overloaded-function' kann
 nicht in 'const System *(__thiscall Universe::* )(int)' konvertiert werden
        Keine Funktion mit diesem Namen im Gültigkeitsbereich stimmt mit dem Zieltyp überein

AI\PythonAI.cpp(53) : error C2440: 'Initialisierung': 'overloaded-function' kann
 nicht in 'const Building *(__thiscall Universe::* )(int)' konvertiert werden
        Keine Funktion mit diesem Namen im Gültigkeitsbereich stimmt mit dem Zieltyp überein

scons: *** [AI\PythonAI-ai.obj] Error 2
scons: building terminated because of errors.
This is the translation of the first error message: 'Initialisation': 'overloaded-function' can't be converted to 'const UniverseObject *(__thiscall Universe::* )(int)'; no function with this name in this context matches the target type
If I provided any images, code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: The Help Thread

#242 Post by Geoff the Medio »

The Silent One wrote:Also, note that the MS SDK paths are not there; so VS2005 seems to supply all necessary header files.
In the IDE (the MSVC GUI), open /util/Process.h. On line 17, there is #include <windows.h>. Right click on the windows.h part, and select Open Document <windows.h>. A new tab with windows.h should open. Hover your mouse over the tab title text, and reply with the path to the windows.h that it shows. That should clarify where it's getting the file.
So if anyone else should have trouble compiling GG with the MS SDK, VS2005 seems to be an alternative.
Not really an "alternative", since Visual Studio is required to use the MS SDK...
The Silent One wrote:After freeoriond.exe compiled successfully, an error occured
You need to install the Visual Studio 2005 Service Pack 1.

User avatar
The Silent One
Graphics
Posts: 1129
Joined: Tue Jul 01, 2003 8:27 pm

Re: The Help Thread

#243 Post by The Silent One »

Geoff the Medio wrote:You need to install the Visual Studio 2005 Service Pack 1.
After this, compiling was successful. Thanks again!
If I provided any images, code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0.

WebSnozz
Krill Swarm
Posts: 12
Joined: Sat Jul 07, 2007 1:26 am
Location: USA

Re: The Help Thread

#244 Post by WebSnozz »

Am I correct in understanding the SDK does not include GG libraries compiled?

If so, then maybe I can add GiGi as another project into the MSVS solution. (Besides, I think the solution file should have the GG directory added to the project properties for the include paths as well)

Until then, consider changing this line on the Compile page in the Wiki to mention that scons will be required to build Gigi on Windows:
SCons (http://www.scons.org/) - required to build GG and FreeOrion (Linux only, optional on Windows; Windows can also use MSVC 2005 IDE)

That way it's clearer to beginners that they can't get away trying to compile exclusively with MSVS(until I or someone gets the solution file setup appropriately).
I'm excited!

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: The Help Thread

#245 Post by Geoff the Medio »

WebSnozz wrote:Am I correct in understanding the SDK does not include GG libraries compiled?
Correct.
If so, then maybe I can add GiGi as another project into the MSVS solution.
If you want to make a separate GiGi solution, then go ahead, but I don't want to put GiGi right into the FreeOrion solution. They are separate things, and FreeOrion treats GiGi as a library, not an internal part of the main program.
(Besides, I think the solution file should have the GG directory added to the project properties for the include paths as well)
Why is this necessary? The headers are in directories that the solution file knows about, so you can look up any GiGi classes within the GUI already...

WebSnozz
Krill Swarm
Posts: 12
Joined: Sat Jul 07, 2007 1:26 am
Location: USA

Re: The Help Thread

#246 Post by WebSnozz »

Geoff the Medio wrote:
WebSnozz wrote:Am I correct in understanding the SDK does not include GG libraries compiled?
Correct.
If so, then maybe I can add GiGi as another project into the MSVS solution.
If you want to make a separate GiGi solution, then go ahead, but I don't want to put GiGi right into the FreeOrion solution. They are separate things, and FreeOrion treats GiGi as a library, not an internal part of the main program.
That sounds good. If someone wanted to add the GG project to their main solution and have it compile as a dependancy, they could do that easily on their own by just adding the existing project from the other solution.
Geoff the Medio wrote:
(Besides, I think the solution file should have the GG directory added to the project properties for the include paths as well)
Why is this necessary? The headers are in directories that the solution file knows about, so you can look up any GiGi classes within the GUI already...
Before I had compiled GG, none of the include directives that referenced the GG directory for header files were working(file not found). If I remember correctly they were of the form:
#include <GG/filename.h>

And the actual file is under something like Freeorion/GG/GG/filename.h, so I added the first GG folder to the include paths and it was able to find the header files, but then I encountered an error where it was trying to link GG *.lib files that weren't found. At that point I realized that perhaps that GG needed to be compiled separately.

I'll speculate that, had I compiled GG first, then the header files would have been copied to one of the existing include directories that the projects are already configured for.

I'm going to give it another go this weekend after I have installed scons and figured out what it is all about. I've always wanted to get on board with an open source project. This is the first time I've found something that I am both really excited about and feel like it is within my abilities.
I'm excited!

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: The Help Thread

#247 Post by Geoff the Medio »

Running scons install in the GG directory puts the necessary GG headers, libs and dlls into the appropriate directories (such as /include which is located in the same SDK dir as /FreeOrion) where the FreeOrion MSVC project and scons scripts expects them to be. I'm not sure why the second copy of the GG headers is necessary, though it is a bit more consistent to have all external libs' headers in the same include dir, and I presume tzlaine had a reason if that wasn't it.

Did you see the README.txt in the SDK? It gives instructions on how to get GG and FreeOrion compiled, which I would have thought would have made the requirement to build GG first clear... or at least made doing so automatic.
I'm going to give it another go this weekend after I have installed scons and figured out what it is all about.
Again, see the README.txt. Once installed, using scons just to get GG and FreeOrion compiled should be trivially simple.
This is the first time I've found something that I am both really excited about and feel like it is within my abilities.
If you, or anyone else, has difficulty getting going coding for FreeOrion, I can probably help with most issues that come up related to working with the established codebase. There's a lot of it there, but you don't need to know it all (I still don't) to get going.

WebSnozz
Krill Swarm
Posts: 12
Joined: Sat Jul 07, 2007 1:26 am
Location: USA

Re: The Help Thread

#248 Post by WebSnozz »

Geoff the Medio wrote:Running scons install in the GG directory puts the necessary GG headers, libs and dlls into the appropriate directories (such as /include which is located in the same SDK dir as /FreeOrion) where the FreeOrion MSVC project and scons scripts expects them to be. I'm not sure why the second copy of the GG headers is necessary, though it is a bit more consistent to have all external libs' headers in the same include dir, and I presume tzlaine had a reason if that wasn't it.

Did you see the README.txt in the SDK? It gives instructions on how to get GG and FreeOrion compiled, which I would have thought would have made the requirement to build GG first clear... or at least made doing so automatic.
I'm going to give it another go this weekend after I have installed scons and figured out what it is all about.
Again, see the README.txt. Once installed, using scons just to get GG and FreeOrion compiled should be trivially simple.
This is the first time I've found something that I am both really excited about and feel like it is within my abilities.
If you, or anyone else, has difficulty getting going coding for FreeOrion, I can probably help with most issues that come up related to working with the established codebase. There's a lot of it there, but you don't need to know it all (I still don't) to get going.
Thanks. I didn't notice the readme.txt.
I'm excited!

tzlaine
Programming Lead Emeritus
Posts: 1092
Joined: Thu Jun 26, 2003 1:33 pm

Re: The Help Thread

#249 Post by tzlaine »

Geoff the Medio wrote:Running scons install in the GG directory puts the necessary GG headers, libs and dlls into the appropriate directories (such as /include which is located in the same SDK dir as /FreeOrion) where the FreeOrion MSVC project and scons scripts expects them to be. I'm not sure why the second copy of the GG headers is necessary, though it is a bit more consistent to have all external libs' headers in the same include dir, and I presume tzlaine had a reason if that wasn't it.
Just FYI, the reason was that it allows me to experiment with changes to GG without breaking FO. For instance, I might try to change the way GG::ListBox works, and so I'm making changes and recompiling, etc. Then I want to see how the old one worked (because I'm not sure how the change I'm making affects some related detail of GG::ListBox's behavior), so I want to run FO, but linked against the original version of GG. Once I'm satisfied that my changes are pretty close to right, I install GG and do the final bit of debugging using FO, linked against the new GG. This is an idiom used pretty widely by anyone who maintains a library and an app that depends on that library.

User avatar
MikkoM
Space Dragon
Posts: 318
Joined: Fri Mar 10, 2006 12:32 pm
Location: Finland

Re: The Help Thread

#250 Post by MikkoM »

I am having some problems with the new RC6. The auto installer/compiler works fine, but after the installation/compiling is complete and I try to start the game I get an error message, which says that there is some problem with the application’s composition (a really bad translation). Not surprisingly my operating system is Windows XP with SP2.

After the error had occurred the first time, I downloaded the FreeOrion Windows development SDK, Python and Scons, but I still got the same error. Also if I can still remember right, I had some problems with an earlier version of the game and back then there was some program other than those that I have already posted here that I needed to download before the game started working. Unfortunately I just can`t remember the name of that program. It might also be good to mention that RC5 works fine on my system.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: The Help Thread

#251 Post by Geoff the Medio »

It sounds a bit like the requirement to have installed the Windows .NET Framework 2.0, though if you can run RC5 without problems, then that might not be it...

RC6 does use Python for AI, which RC5 didn't. I'm not sure if it'd be required to separately install that... (if so, we should probably find a workaround) ... but if that was the case, I think the error message would specifically mention a python-related dll filename.

Is the error message a windows popup, or command-line output?

User avatar
MikkoM
Space Dragon
Posts: 318
Joined: Fri Mar 10, 2006 12:32 pm
Location: Finland

Re: The Help Thread

#252 Post by MikkoM »

Geoff the Medio wrote:Is the error message a windows popup, or command-line output?
It is a windows popup. I could try to do a more accurate translation of the message, but I don`t think that would help much, since the error message doesn`t really say anything specific. There is just the part that I have already posted and then it suggests that maybe the problem could be solved by reinstalling the game. I have tried that several times but the same error occurs.

Geoff the Medio wrote:It sounds a bit like the requirement to have installed the Windows .NET Framework 2.0, though if you can run RC5 without problems, then that might not be it...
This was probably the problem that I had with an earlier version of the game. Can the NET Framework 2.0 still be used or is there a new version or update that is required?
The Silent One wrote:
Geoff the Medio wrote:After freeoriond.exe compiled successfully, an error occured
You need to install the Visual Studio 2005 Service Pack 1.
Do I also need this Visual Studio 2005 Service Pack 1 or is it just a development tool? And if this software is needed it might be a problem, since I already downloaded the file yesterday and tried to update the software put couldn`t do it. Later I discovered that my Visual Studio files were last modified January 2003, so I don`t think that I have Visual Studio 2005 on my computer. After that I tried to search the program from the net, but found a million different user group versions of the program ranging from Visual Studio for dogs to Visual Studio for Indian gurus (well maybe those weren`t the exact user groups that I found :) ). So I didn`t know which of these versions was the right one and some of them were only freely available for a certain trail period.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: The Help Thread

#253 Post by Geoff the Medio »

MikkoM wrote:Can the NET Framework 2.0 still be used or is there a new version or update that is required?
Version 2.0 is still fine. There is a newer version, but it's not required.
Do I also need this Visual Studio 2005 Service Pack 1 or is it just a development tool?
You only need Visual Studio service packs if you're trying to use Visual Studio to compile FreeOrion. The point of the installer downloads is so that most people don't need to compile anything.
...I discovered that my Visual Studio files were last modified January 2003, so I don`t think that I have Visual Studio 2005 on my computer.
You should have a start menu group for Microsoft Visual Studio 200X, where X depends on the version.
So I didn`t know which of these versions [of Visual Studio] was the right one and some of them were only freely available for a certain trail period.
I'm not sure what you were searching for, or what all those versions were, but the only legally freely downloadable version of Microsoft Visual Studio is the Express Edition, which is available from Microsoft, and is highly ranked in appropriate Google searches.

Regardless, you shouldn't need MSVS to run the installer downloads, and the Express Edition might not be able to compile FreeOrion anyway (I've not heard anyone's report on this).

WebSnozz
Krill Swarm
Posts: 12
Joined: Sat Jul 07, 2007 1:26 am
Location: USA

Re: The Help Thread

#254 Post by WebSnozz »

Geoff the Medio wrote:the Express Edition might not be able to compile FreeOrion anyway (I've not heard anyone's report on this).
My experience with VS Express for C# is that the compiler is seemingly identical to the professional and enterprise editions. The features of the IDE are the main differences. Perhaps this is true of C++ Express as well. From the looks of this they all have the same x86 compiler:
http://msdn2.microsoft.com/en-us/librar ... S.80).aspx

However, I believe projects and solutions created in "greater" editions of VS generally can't be opened in lesser editions. But the reverse is the opposite. VS Express edition projects and solutions can be opened in greater editions, which involves an automated conversion process. Once you open the solution file and convert it, then it can no longer be opened in the lesser addition. So an Express user may need to create their own solution and projects and add the files to them, since they wouldn't be able to open the existing solution and projects.
I'm excited!

Underling
Space Squid
Posts: 72
Joined: Thu Nov 20, 2003 3:09 pm
Location: New Jersey

Re: The Help Thread

#255 Post by Underling »

I'm getting the same problem. Uninstalled RC5 and reinstalled 6 today. When attempting to run the program, the following windowed error message occurs:

C:\Program Files\FreeOrion\freeorion.exe
this application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.

Needless to say, .Net framework is installed as RC5 worked fine. I'm running winXP service pack 2. Just wanted to post and confirm that this is not a unique issue.

The 'Ling

Post Reply