[Gammaray-interest] Build failure of 2.0.0 on Windows with MSVC 2013
Volker Krause
volker.krause at kdab.com
Mon Jan 20 13:52:12 CET 2014
Hi,
thanks for the hint, I've fixed this in Git, in the 2.0 branch and in master.
regards,
Volker
On Sunday 19 January 2014 09:27:51 Igor Mironchik wrote:
> Hi.
>
> On windows it's impossible to build GammRay 2.0.0 with MSVC 2013...
>
> D:\GammaRay-2.0.0\plugins\styleinspector\complexcontrolmodel.cpp(36) :
> error C24
> 91: 'log2' : definition of dllimport function not allowed
> D:\GammaRay-2.0.0\plugins\styleinspector\complexcontrolmodel.cpp(92) :
> error C26
> 68: 'log2' : ambiguous call to overloaded function
> c:\Program Files (x86)\Microsoft Visual Studio
> 12.0\VC\include\math.h(12
> 15): could be 'long double log2(long double) throw()'
> c:\Program Files (x86)\Microsoft Visual Studio
> 12.0\VC\include\math.h(10
> 99): or 'float log2(float) throw()'
> c:\Program Files (x86)\Microsoft Visual Studio
> 12.0\VC\include\math.h(50
> 4): or 'double log2(double)'
> while trying to match the argument list '(QStyle::SubControl)'
> NMAKE : fatal error U1077: 'c:\PROGRA~2\MICROS~2.0\VC\bin\cl.exe' :
> return code
> '0x2'
> Stop.
>
> I simple removed this:
>
> #if defined(_MSC_VER) || defined(Q_OS_ANDROID) // only MSVC and Android
> don't have log2()...
> static double log2(double n)
> {
> return log(n) / log(2.0f);
> }
> #endif
>
> And
>
> for (int i = 0; i < log2(QStyle::SC_All); ++i)
>
> changed to
>
> for (int i = 0; i < log2((double)QStyle::SC_All); ++i)
--
Volker Krause | volker.krause at kdab.com | Senior Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel. Germany +49-30-521325470, Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-independent software solutions
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4840 bytes
Desc: not available
URL: <http://mail.kdab.com/pipermail/gammaray-interest/attachments/20140120/11d44b93/attachment.bin>
More information about the Gammaray-interest
mailing list