Page 1 of 1

compile error: duplicate explicit instantiation

Posted: Thu Sep 17, 2015 7:21 pm
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>;

Re: compile error: duplicate explicit instantiation

Posted: Thu Sep 17, 2015 7:35 pm
by Geoff the Medio
should be fixed

Re: compile error: duplicate explicit instantiation

Posted: Thu Sep 17, 2015 8:01 pm
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)'

Re: compile error: duplicate explicit instantiation

Posted: Thu Sep 17, 2015 8:36 pm
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).

Re: compile error: duplicate explicit instantiation

Posted: Thu Sep 17, 2015 9:23 pm
by Nexus
Success. :)