Skip to content
Permalink
Browse files

Fixed bug 3552 - Building SDL in release mode fails under VS 2017 RC

Lukasz Biel

Tried to compile SDL2 using newest version of VS.

Got:
SDL_audiocvt.obj : error LNK2019: unresolved external symbol memcpy referenced in function SDL_ResampleCVT
1>E:\Users\dotPo\Lib\SDL\VisualC\x64\Release\SDL2.dll : fatal error LNK1120: 1 unresolved externals

whole compilation process: http://pastebin.com/eWDAvBce

Steps to reproduce:
clone http://hg.libsdl.org/SDL using tortoise hg,
open SDL\VisualC\SDL.sln,
when promted if should retarget solution click ok,
select release x64 build type,
Build/Build Solution

attempt 2, using Visual Studio cmake support:
open folder SDL\
select release x64 build type,
run CMake\Build CMakeLists.txt
build fails

When switched to debug build type, buils succeeds in both cases.
VS 2017 is still beta.
  • Loading branch information
slouken committed Jan 10, 2017
1 parent 23020f9 commit bf11cd5084f9c89b6f01bc7c41fddc82745ca14c
Showing with 1 addition and 4 deletions.
  1. +1 −4 src/audio/SDL_audiocvt.c
@@ -378,13 +378,10 @@ SDL_ResampleCVT(SDL_AudioCVT *cvt, const int chans, const SDL_AudioFormat format
float *dst = (float *) (cvt->buf + srclen);
const int dstlen = (cvt->len * cvt->len_mult) - srclen;
float state[8];
int i;

SDL_assert(format == AUDIO_F32SYS);

for (i = 0; i < chans; i++) {
state[i] = src[i];
}
SDL_memcpy(state, src, chans*sizeof(*src));

cvt->len_cvt = SDL_ResampleAudioSimple(chans, cvt->rate_incr, state, src, srclen, dst, dstlen);

0 comments on commit bf11cd5

Please sign in to comment.