From 25c32d082b1ab4c3567c09f707e75c8ac582806c Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Fri, 3 Jun 2011 13:30:27 +0200 Subject: cmdutils: move "#undef main" from ffplay.c to cmdutils.h On Windows/MinGW the SDL cflags re-define the main() function, which results in a linking error if the define is not undeffed. Since the addition of the SDL output device, SDL cflags are used also for compiling ffmpeg and ffprobe, so we need to move this trick from ffplay.c to a common header. Fix trac issue #256. --- cmdutils.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cmdutils.h') diff --git a/cmdutils.h b/cmdutils.h index eea4401..eca98a3 100644 --- a/cmdutils.h +++ b/cmdutils.h @@ -29,6 +29,10 @@ #include "libavformat/avformat.h" #include "libswscale/swscale.h" +#ifdef __MINGW32__ +#undef main /* We don't want SDL to override our main() */ +#endif + /** * program name, defined by the program for show_version(). */ -- cgit v1.1