FreeOrion

Forums for the FreeOrion project
It is currently Sun Dec 17, 2017 4:20 am

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Mon Aug 23, 2010 4:26 pm 
Offline
Krill Swarm

Joined: Fri Aug 20, 2010 8:04 pm
Posts: 14
This is a solved problem, I post it for the case more newbies get in trouble with the same issue.

I had problems with compiling FreeOrion after I downloaded the SDK. The compiler pretended not to find the file <alut.h>. After I updated the project via SVN, it worked again.

Another problem was that upon running, the game exited, telling it was unable to find the file RenderSystem_GL.dll. The program tried to search for it in "Program Files", an attemt that failed. Apparently, the reason was that I had a precompiled version of FreeOrion previously installed into "Program files", and config.xml listed wrong paths. Removing this file helped.

Below is attached my correspondence with Geoff the Medio, to whom I thank a lot for help.

iron_gollum wrote:
P.S. I had to add '../../../../include/AL' to the additional include directories list, otherwise the soluton wouldn't compile.


Geoff the Medio wrote:
To which project? The freeorion project, which is the only one that uses any sound stuff, already has that include directory specified.


iron_gollum wrote:
this is strange, for I can't compile the freeorion project without changing project properies. And even after compilation, I can't run the program, it states that it cannot find RenderSystemGl.dll, although the .dll file is also there. Maybe there is a problem with the reading of .xml file? Can you tell me, at which point the project accesses it?


Geoff the Medio wrote:
iron_gollum wrote:
this is strange, for I can't compile the freeorion project without changing project properies.

But what did you change? The project already has that include directory specified... so where do you add it?

Quote:
And even after compilation, I can't run the program, it states that it cannot find RenderSystemGl.dll, although the .dll file is also there. Maybe there is a problem with the reading of .xml file? Can you tell me, at which point the project accesses it?

How are you trying to run it? From the MSVS run button? In that case, you probably need to tell it the target path and working directory, which aren't stored in the project files you downloaded. These are in the project properties, configuration properties, debugging section. I set Command to $(TargetPath) and Working Directory to $(TargetDir).

But I still don't have much luck running with the debugger attached for unknown reasons, and generally just run from the command line. To do that, make sure the target path is in the main freeorion directory where all the DLLs that came with the SDK are located, and then run "freeorion" or "freeorion -q" (for quickstart) from the msvs command prompt (cmd.exe) starting from the proper directory.


iron_gollum wrote:
Quote:
But what did you change? The project already has that include directory specified... so where do you add it?


The original project has only these additional include directories:

../../../log4cpp/
../../../../include/
../../../../Boost/include/boost_1_42
../../../GG/
../../include
../../../../include/OGRE
../../../../include/bullet


And alut.h states:

Quote:
#if defined(_MSC_VER)
#include <alc.h>
#include <al.h>
#elif defined(__APPLE__)
#include <OpenAL/alc.h>
#include <OpenAL/al.h>
#else
#include <AL/al.h>
#include <AL/alc.h>
#endif


which apparently means that for Windows, the path to these both files is not correctly specified (yes, I am a Windows user :oops: ). So if I add ../../../../include/AL to Properties->C/C++->General->Additional include directories, it compiles perfectly.

Quote:
How are you trying to run it? From the MSVS run button?


Yes, I tried this one. But now the program tries to access files from the directory Program Files/FreeOrion/default. Is threre a way to make it operate in the directory where the .exe file compiles to?


Geoff the Medio wrote:
iron_gollum wrote:
The original project has only these additional include directories:
As I said before, the freeorion project in SVN already has that include directory specified (see line 45). You must not be using that project file. Have you updated to the latest SVN, and are you using the MSVS project file from SVN, or one generated with CMake?

iron_gollum wrote:
But now the program tries to access files from the directory Program Files/FreeOrion/default. Is threre a way to make it operate in the directory where the .exe file compiles to?

Delete your config.xml or edit it to point <resource-dir> to the desired default directory (presumably within the SDK directory).


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group