compile problem

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Post Reply
Message
Author
xlightwavex
Space Kraken
Posts: 111
Joined: Mon Nov 16, 2015 5:57 am

compile problem

#1 Post by xlightwavex »

Im getting a error in one spot the freeorion project itself.

In the class Designwnd.cpp ...
in method float GetMainStat ...
in the first switch statement ...

two cases are throwing a undefined error
im getting a error for these two


case PC_FIGHTER_BAY:
case PC_FIGHTER_WEAPON:


What am i missing ?
Did something go wrong when the bootstrap when it grabed the master.
What should i do now ...?

I didn't understand the boot strapper at all it made it easy but its not compiling.
Shouldn't i have had to fork a branch or something.
I really stink with github stuff.

spikethehobbit
Space Squid
Posts: 66
Joined: Mon Aug 27, 2012 7:24 pm

Re: compile problem

#2 Post by spikethehobbit »

This is a bug in the latest commit, which is a risk when using experimental builds. What I would suggest is to comment out the two offending lines and recompile.
All contributions are submitted under GPL or LGPL v2 or later, or under appropriate Creative Commons licence, consistent with project guidlines.

xlightwavex
Space Kraken
Posts: 111
Joined: Mon Nov 16, 2015 5:57 am

Re: compile problem

#3 Post by xlightwavex »

i was just about to start trying that but you know deleting on a first compile i was thinking its me.

spikethehobbit
Space Squid
Posts: 66
Joined: Mon Aug 27, 2012 7:24 pm

Re: compile problem

#4 Post by spikethehobbit »

Yeah, I know how that goes. Good luck.
All contributions are submitted under GPL or LGPL v2 or later, or under appropriate Creative Commons licence, consistent with project guidlines.

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

Re: compile problem

#5 Post by Geoff the Medio »


xlightwavex
Space Kraken
Posts: 111
Joined: Mon Nov 16, 2015 5:57 am

Re: compile problem

#6 Post by xlightwavex »

It builds with no errors but then im getting errors when i actually try to run it.
Im very much a noob at git, ive only dabbled with it.
The bootstrapper made it easier but all the more confusing as to what all it did.

Can you normally execute the program after a build ?
Or do you guys just build this then install it to test it ?
The console is saying something about it cant install ?

Im guessing something else messed up this is what appears in the output window.
bunches of these
SysWOW64\ws2_32.dll'. Cannot find or open the PDB file (i think thats the symbols for debugging).
followed by
First-chance exception at 0x7532C42D in FreeOrion.exe: Microsoft C++ exception: std::runtime_error at memory location 0x0018FCF0.
However this is not being handled automatically
nor is the debugger continuing to execute so i cant get any more info.
Hopefully fixed: https://github.com/freeorion/freeorion/ ... 4ff7677e83
So should i delete the FO folder and run the bootstrapper again?
or
Download again hard reset or fork it or what ?

please advise, thanks.

edit:
Im just dling the whole sdk over again and starting from scratch.
edit:
bootstrapper has a bug see below.
Last edited by xlightwavex on Sun Dec 13, 2015 12:54 am, edited 3 times in total.

xlightwavex
Space Kraken
Posts: 111
Joined: Mon Nov 16, 2015 5:57 am

Re: compile problem

#7 Post by xlightwavex »

Found the problem...
The bootstrapper is dropping the "default" folder into a path the app isn't looking, placing it here...

...\FreeOrion_VS2013_sdk_apr_2015\

But the app is searching for the folder within

...\FreeOrion_VS2013_sdk_apr_2015\msvc2013\FreeOrion\

Only the console window gives a clue as to what was wrong, its easy to miss.
Im guessing that is unintended ?

i copied the whole folder over, and it worked.

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: compile problem

#8 Post by Vezzra »

xlightwavex wrote:The bootstrapper is dropping the "default" folder into a path the app isn't looking, placing it here...

...\FreeOrion_VS2013_sdk_apr_2015\
Well, that isn't exactly correct - the bootstrapper doesn't drop the "default" folder anywhere, it just clones the FO git repo and checks out master. The "default" folder therefore is right where it's located in the source tree as it's provided by the repo. The location you found it is where the "default" folder is intended to be.
But the app is searching for the folder within

...\FreeOrion_VS2013_sdk_apr_2015\msvc2013\FreeOrion\
This however is not where the app should look for the default folder. Maybe your config.xml has been messed up, please delete it and try again (see here for the location of the config.xml file).

If that doesn't help, there might be a bug in the MSVC solution or the contained projects settings somewhere that make the FreeOrion.exe executable look for the "default" folder in the wrong location when launched directly from the working copy.

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

Re: compile problem

#9 Post by Geoff the Medio »

If you're attempting to run FreeOrion using the MSVC run button, then you first need to edit the project's working directory to be $(TargetDir). That setting isn't, as far as I know, stored in the project files, so you need to set it locally for that button to work. The normal / expect way to run FreeOrion for dev purposes on Windows is to run "Freeorion.exe" from a command prompt in the FreeOrion directory in the main SDK directory.
Attachments
working_dir.png
working_dir.png (33.91 KiB) Viewed 12347 times

Post Reply