compile error: duplicate explicit instantiation

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Post Reply
Message
Author
Nexus
Space Floater
Posts: 48
Joined: Fri Aug 14, 2015 8:29 pm

compile error: duplicate explicit instantiation

#1 Post by Nexus »

Tried to compile latest (560e642a57) version on Linux Mint 17.2, 64 bit. I got this error:

Code: Select all

GLClientAndServerBuffer.cpp:201:16: error: duplicate explicit instantiation of ‘class GG::GLClientAndServerBufferBase<float>’ [-fpermissive]
 template class GLClientAndServerBufferBase<float>;

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

Re: compile error: duplicate explicit instantiation

#2 Post by Geoff the Medio »

should be fixed

Nexus
Space Floater
Posts: 48
Joined: Fri Aug 14, 2015 8:29 pm

Re: compile error: duplicate explicit instantiation

#3 Post by Nexus »

Wow, that was quick! You don't mess around, do you? That problem seems to be fixed, but I am now getting

Code: Select all

MapWnd.cpp.o: In function `MapWnd::RenderStarfields()':
MapWnd.cpp:(.text+0x4884): undefined reference to `RandGaussian(double, double)'
MapWnd.cpp:(.text+0x48a2): undefined reference to `RandGaussian(double, double)'

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

Re: compile error: duplicate explicit instantiation

#4 Post by Geoff the Medio »

Try adding

Code: Select all

#include "../util/Random.h"
near the top, amongst the other includes.

Edit: nevermind, it's already there.

Edit2: Try adding "FO_COMMON_API " before the declaration of RandGaussian in Random.h (at the bottom).

Nexus
Space Floater
Posts: 48
Joined: Fri Aug 14, 2015 8:29 pm

Re: compile error: duplicate explicit instantiation

#5 Post by Nexus »

Success. :)

Post Reply