Wrong boost version in windows sdk?

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Post Reply
Message
Author
Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Wrong boost version in windows sdk?

#1 Post by Ophiuchus »

Hi,

I'm trying to build the current freeorion on windows, VS 2015 community edition, and it seems that freeorion expects a different boost version than the one from the sdk (from the sourceforge page, from april 2015).

Code: Select all

1>LINK : fatal error LNK1104: Datei "boost_filesystem-vc140-mt-1_58.lib" kann nicht geöffnet werden.
What I find here is a boost_filesystem-vc120-mt-1_58.dll

So where do I get that boost from?
:)

Thanks, regards
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

LGM-Doyle
Programmer
Posts: 219
Joined: Mon Feb 29, 2016 8:37 pm

Re: Wrong boost version in windows sdk?

#2 Post by LGM-Doyle »

I am not windows programmer. However, these are the boost libraries that freeorion uses and this is the download page:

Code: Select all

http://www.boost.org/users/download/
Good luck.

p.s. If you open an issue on https://github.com/freeorion/freeorion/issues/new with all the relevant details then it will not be forgotten and will be fixed.

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

Re: Wrong boost version in windows sdk?

#3 Post by xlightwavex »

I found a compile error were a older installed version of free orion didn't uninstall a older boost library.

This caused some kind of a conflict with a newer version. Aka it didn't uninstall the previous boost library (because it can and does occasionally not close the process freeorionCA* when run), it then prevented the library from uninstalling when the application was removed and it remained in place.

Note this problem may also affect any regular user who.

Has not uninstalled the sept 9th 2015 stable version of freeorion, then runs fo prior to a attempt to remove it and then install the new stable version 4.6. This will occur, if his freeorionCA process hangs on close, prior to uninstalling.


Btw this is most likely caused by a indirect file io memory leak, due to a file or some resource being opened but not not being flushed or closed properly, thus not releasing it, so that the process cant close.

The solution to this particular problem is as follows.

Via 'control+alt+delete' by using the task manager if you know how to do so. Or (by rebooting your computer you can skip the below step #1 )

1)

Ensure that no freeorion process is active. (there maybe more then one active, it's a bug)

2)

Then Delete from within 'program files x86 (or where ever fo was installed)' > the 'freeorion' folder, (ensure it actually is deleted).

3)

Then reinstall the new version or recompile run the application.


Im mentioning this because it sounds like it maybe related to or the same problem i encountered.


http://freeorion.org/index.php/Compile_In_Windows
when you download the sdk it should have the correct boost library within it already.
https://sourceforge.net/projects/freeor ... ion%20SDK/
Software dependency requirements

Note: On Windows and OSX, most dependencies are available pre-compiled in the FreeOrion SDK.

Boost - version 1.54 or later.
FreeType2 -version 2.5.3 is known to work.
Python - version 2.7 or later (version 2.x only; 3.x will not work)
OpenAL
libogg - version 1.1.3 or later 1.2.1 is known to work.
libvorbis - version 1.1.2 or later 1.3.2 is known to work.
zlib - version 1.2.5 is known to work with libpng 1.4.4
libpng - version 1.6 works.
SDL2 - version 2.0.3 works.
GLEW - (Windows only) version 1.5.7 is known to work.
Executing the bootstrapper within the sdk, should get all the current source code from github when its done grabbing the files, You should be able to simply open the project from vs via browsing to the folder or use the team explorer to open the solution. It takes a good amount of time to build like as in for me a couple hours Yikes.

Lord ive been spoiled by c# so bad.

User avatar
adrian_broher
Programmer
Posts: 1156
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

Re: Wrong boost version in windows sdk?

#4 Post by adrian_broher »

I'm trying to build the current freeorion on windows, VS 2015 community edition
We don't support VS 2015 (vc140 toolchain) yet. Use VS 2013 (vc120 toolchain).
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Wrong boost version in windows sdk?

#5 Post by Ophiuchus »

adrian_broher wrote:
I'm trying to build the current freeorion on windows, VS 2015 community edition
We don't support VS 2015 (vc140 toolchain) yet. Use VS 2013 (vc120 toolchain).
Thanks Adrian, that was the problem.

I fixed it by starting the Visual Studio installer and checking the "Windows 8.1 and Windows Phone 8.0/8.1 Tools" which installs the vc120 chain.
Afterwards for every project I manually changed the toolchain setting.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Wrong boost version in windows sdk?

#6 Post by Ophiuchus »

Ophiuchus wrote:I fixed it by starting the Visual Studio installer and checking the "Windows 8.1 and Windows Phone 8.0/8.1 Tools" which installs the vc120 chain.
Afterwards for every project I manually changed the toolchain setting.
After switching branches and merging it seems it does not work anymore, getting strange compiler errors. Cleaning the working copy and redoing what I originally did, did not change anything.
e.g. for ClientUI.cpp I get

Code: Select all

class ClientUI hat keinen Member "MessageBoxA"

occuring in line 945:

Code: Select all

void ClientUI::MessageBox(const std::string& message, bool play_alert_sound/* = false*/) {
And that looks like totally normal code to me. Also googling didnt help.

I tried using cmake then, but that made even more headaches (finding the right parameters e.g.

Code: Select all

cmake -G "Visual Studio 14 2015" -T v120 .
, not finding libraries during compile (e.g. looking for boost_filesystem.lib instead of boost_filesystem-vc120-mt-gd-1_58.lib), wanting a different kind of boost library for linking (e.g. boost_filesystem-vc120-mt-gd-1_58.lib instead of boost_filesystem-vc120-mt-1_58.lib)) and generally not looking in the correct folders for the libraries.

I usually don't work with the C++/cmake/MSVC usually, so all this is pretty new to me.

I again went cleaning the working copy and getting the same compiler errors. VS 2013 wrecked two of my installs, so I wont go that way. And I don't have a spare computer around only for compiling freeorion.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

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

Re: Wrong boost version in windows sdk?

#7 Post by Vezzra »

Ophiuchus wrote:e.g. for ClientUI.cpp I get

Code: Select all

class ClientUI hat keinen Member "MessageBoxA"

occuring in line 945:

Code: Select all

void ClientUI::MessageBox(const std::string& message, bool play_alert_sound/* = false*/) {
And that looks like totally normal code to me.
That's actually an unrelated issue:
https://github.com/freeorion/freeorion/issues/1049

Which has been fixed already: f5fa33f

So, in theory, things should work again.

Post Reply