FreeOrion

Forums for the FreeOrion project
It is currently Sat Nov 18, 2017 6:20 am

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Mon Sep 07, 2015 4:08 pm 
Offline
Space Floater

Joined: Fri Aug 14, 2015 8:29 pm
Posts: 47
Latest version (551a79a729) fails to compile for me, on Linux Mint 17.2, 64 bit

I get this error:

Code:
/home/nexus/Games/freeorion/UI/SystemIcon.cpp: In constructor ‘SystemIcon::SystemIcon(GG::X, GG::Y, GG::X, int)’:
/home/nexus/Games/freeorion/UI/SystemIcon.cpp:375:148: error: invalid initialization of non-const reference of type ‘boost::shared_ptr<GG::Texture>&’ from an rvalue of type ‘boost::shared_ptr<GG::Texture>’
     boost::shared_ptr<GG::Texture>& texture = ClientUI::GetTexture(ClientUI::ArtDir() / "misc" / "system_selection" / "system_selection2.png", true);
                                                                                                                                                    ^
/home/nexus/Games/freeorion/UI/SystemIcon.cpp:385:163: error: invalid initialization of non-const reference of type ‘boost::shared_ptr<GG::Texture>&’ from an rvalue of type ‘boost::shared_ptr<GG::Texture>’
     boost::shared_ptr<GG::Texture>& tiny_texture = ClientUI::GetTexture(ClientUI::ArtDir() / "misc" / "system_selection_tiny" / "system_selection_tiny2.png", true);
                                                                                                                                                                   ^
make[2]: *** [client/human/CMakeFiles/freeorion.dir/__/__/UI/SystemIcon.cpp.o] Error 1
make[1]: *** [client/human/CMakeFiles/freeorion.dir/all] Error 2
make: *** [all] Error 2


Any idea what's wrong?


Last edited by Nexus on Mon Sep 07, 2015 6:47 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Mon Sep 07, 2015 4:19 pm 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12012
Location: Munich
Differences between compilers.

Try putting "const " before "boost::shared_ptr<GG::Texture>&" on the lines with errors.


Top
 Profile  
 
PostPosted: Mon Sep 07, 2015 4:35 pm 
Offline
Space Floater

Joined: Fri Aug 14, 2015 8:29 pm
Posts: 47
That seems to have fixed that error, but now I am getting a bunch of errors like

Code:
SystemIcon.cpp:379:104: error: no matching function for call to ‘RotatingGraphic::RotatingGraphic(const boost::shared_ptr<GG::Texture>&, boost::enable_if_c<true, GG::Flags<GG::GraphicStyle> >::type)’
     m_selection_indicator = new RotatingGraphic(texture, GG::GRAPHIC_FITGRAPHIC | GG::GRAPHIC_PROPSCALE);


I don't understand the code (or C++) well enough to feel confident tackling these myself.


Top
 Profile  
 
PostPosted: Mon Sep 07, 2015 5:55 pm 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12012
Location: Munich
Try the latest master revision (after this).


Top
 Profile  
 
PostPosted: Mon Sep 07, 2015 6:46 pm 
Offline
Space Floater

Joined: Fri Aug 14, 2015 8:29 pm
Posts: 47
That's fixed the problem. Thanks!


Top
 Profile  
 
PostPosted: Mon Sep 07, 2015 7:04 pm 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3257
I got the same errors this afternoon but had to run out before investigating, the game did run fine with the correct version string in the head tho, which I thought a bit weird. Fixed now, compiled with no errors.

_________________
Mat Bowles

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


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

All times are UTC


Who is online

Users browsing this forum: AhrefsBot 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:  
Powered by phpBB® Forum Software © phpBB Group