diff options
author | Pavol Markovic <pavol.markovic@kompiler.info> | 2016-10-01 12:46:55 +1300 |
---|---|---|
committer | Pavol Markovic <pavol.markovic@kompiler.info> | 2016-10-06 11:57:55 +0000 |
commit | 39e1368f98fc9cb3283da6c3a9dd66d527b09bc2 (patch) | |
tree | 03959788ad20d0d60b48f5c84fe946422004b4a0 /src/3rdparty/masm/wtf | |
parent | 738936361952b62f1ee7ee171c6400e0963853f6 (diff) |
Fix linking against static build in Visual Studio 2015
This fix builds on commit f656fc588bab4104d531cb46836168da6736a518
from 22 April 2016 which conditionally includes missing
math functions for Visual Studio older than 2013.
log2 and log2f functions have not been included in the fix because
there was no name conflict in Qt lib itself, but the problem
becomes prominent when trying to link an application simultaneously
to libucrt.lib and qt built with -static -static-runtime options.
This fix corrects following linking issues:
Qt5Qml-static.lib(qv4value.obj) :
error LNK2005: _log2 already defined in libucrt.lib(log2d.obj)
Qt5Qml-static.lib(qv4dateobject.obj) :
error LNK2005: _log2 already defined in libucrt.lib(log2d.obj)
Qt5Qml-static.lib(qv4runtime.obj) :
error LNK2005: _log2 already defined in libucrt.lib(log2d.obj)
Qt5Qml-static.lib(qv4globalobject.obj) :
error LNK2005: _log2 already defined in libucrt.lib(log2d.obj)
Qt5Qml-static.lib(qv4jsonobject.obj) :
error LNK2005: _log2 already defined in libucrt.lib(log2d.obj)
This fix has been previously committed to dev branch for review
but was recommended to use branch 5.6, same as referenced commit.
Change-Id: Iad88d1665c243c4beb91fe71bf5de390cc8ee73e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/3rdparty/masm/wtf')
-rw-r--r-- | src/3rdparty/masm/wtf/MathExtras.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/3rdparty/masm/wtf/MathExtras.h b/src/3rdparty/masm/wtf/MathExtras.h index 9c38af6b16..75e3670367 100644 --- a/src/3rdparty/masm/wtf/MathExtras.h +++ b/src/3rdparty/masm/wtf/MathExtras.h @@ -152,7 +152,7 @@ inline long lroundf(float num) { return static_cast<long>(roundf(num)); } inline long long abs(long num) { return labs(num); } #endif -#if COMPILER(MSVC) +#if COMPILER(MSVC) && COMPILER(MSVC12_OR_LOWER) // MSVC's math.h does not currently supply log2 or log2f. inline double log2(double num) { |