Skip to content

Commit

Permalink
Fixed bug 3979 - Failed to link with "multiple definition of `scalbln…
Browse files Browse the repository at this point in the history
…'" error on both MinGW and MinGW-w64 by CMake

Vitaly Novichkov

Once I ran build of my codecs collection on AppVeyor where my CMake script downloads latest SDL2 from HG repo, failed to link because of math functions conflict:

https://ci.appveyor.com/project/Wohlstand/audiocodecs/build/1.0.44
The revision is b9ff5f8b2303

There are both vanilla MinGW and MinGW-w64 are failed to build.


```
[100%] Linking C shared library libSDL2.dll
c:/mingw/bin/../lib/gcc/mingw32/5.3.0/../../../libmingwex.a(scalbn.o):(.text+0x0): multiple definition of `scalbln'
CMakeFiles\SDL2.dir/objects.a(s_scalbn.c.obj):C:/projects/audiocodecs/build-MinGW-Release-Win32/external/SDL2/src/SDL2HG/src/libm/s_scalbn.c:30: first defined here
  • Loading branch information
slouken committed Nov 24, 2017
1 parent f776997 commit 5f38b5d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/libm/math_private.h
Expand Up @@ -40,6 +40,7 @@ typedef unsigned int u_int32_t;
#define __ieee754_fmod SDL_uclibc_fmod
#define __ieee754_log SDL_uclibc_log
#define __ieee754_pow SDL_uclibc_pow
#define scalbln SDL_uclibc_scalbln
#define scalbn SDL_uclibc_scalbn
#define sin SDL_uclibc_sin
#define __ieee754_sqrt SDL_uclibc_sqrt
Expand Down

0 comments on commit 5f38b5d

Please sign in to comment.