[FFmpeg-devel] [PATCH] undef main when using SDL with MSVC toolchain

John Peebles johnpeeb at gmail.com
Sat May 17 04:34:11 CEST 2014

On windows, the SDL library headers redefine main as SDL_main, which would
break the build off ffplay since there is no entry point when linking. To
fix this, cmdutils.h includes the lines

#ifdef __MINGW32__
#undef main /* We don't want SDL to override our main() */

However, MINGW32 is not defined when doing a build with the MSVC toolchain.
This causes a linker error when trying to build ffplay using the MSVC
toolchain. The included patch adds an additional check for the MSVC
compiler and undefines main if we are using it, fixing the linker error.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-cmdutils-undef-main-when-using-SDL-with-VC-compiler-.patch
Type: application/octet-stream
Size: 708 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140516/a454ad84/attachment.obj>

More information about the ffmpeg-devel mailing list