build ffmpeg with eclipse cdt on mac

6835 ワード

This FFmpeg version is 2.8

the latest version make error , the stable release has no error

eprecated here
void av_picture_copy(AVPicture *dst, const AVPicture *src,
     ^
ffplay.c:3761:24: error: token is not a valid binary operator in a preprocessor subexpression
if CONFIG_AVDEVICE    avdevice_register_all();

/bin/sh: _: command not found
If so I found the problem is that OSX does not pass the PATH variable to applications started through the GUI. So to get around this one should start eclipse from the terminal. This worked when I had the problem.
HTML    doc/ffmpeg.html
/bin/sh: texi2html: command not found
make: *** [doc/ffmpeg.html] Error 127


CC  libavfilter/vsrc_testsrc.o
/bin/sh: yasm: command not found
make: *** [libavfilter/x86/af_volume.o] Error 127

Installing GDB on OS X Mavericks
Launching "ffplay_g" has encountered a problem
Error with command: gdb --version
Cannot run program "gdb": Unknown reason

Homebrew formula of GDB with patch for OS X Yosemite brew install https://gist.githubusercontent.com/ymyzk/10ad2b74af9235eddb2c/raw/9d0b9734ea01f9753a5f54dd221acd99ee7e53e8/gdb.rb
Eclipse GDB debugger support
Can’t find the tool settings in Eclipse CDT
I switched C/C++ Build->Builder Settings->Builder type to External Builder, if builder type is disable, do restore defaults , and closed the properties window. When reopening properties the C/C++ Build->Settings->Tool Settings Tab was available.

Error: unresolved inclusion: <SDL.h>


Fix: Properties -> C/C++ General -> Paths and Symbols ->includes -> GUN C++ (and GUN C) -> add /usr/local/include/SDL
ffmpeg not support SDL2 now
I am not sure this section is correct, because I not click “run to next” in eclipse. After I do the following step, there are still “No Source Available”, But once I click “next”, everything is well ��
No Source Available The problem was that I was using the Release version of SDL instead of the Debug version! (I had ‘libsdl’ from MacPorts whereas I should have had ‘libsdl-devel’.)
Building SDL in debug mode on Linux ./configure --enable-debug or CFLAGS='-O0 -g' ./configure


Error: ./include/SDL_syswm.h:58:10: fatal error: 'X11/Xlib.h' file not found
Fix: export CPPFLAGS=-I/opt/X11/include
-Error:error: unknown type name 'CGDirectPaletteRef' Fix:このSDLのコンパイルエラーは、最新のOS X 10.9によるものです.SDL開発バージョンライブラリのコミットを参照してください.これは1ヶ月前の修復ですが、まだ安定したバージョンにパッケージされていないようですので、今回の提出に従ってコードを修正しましょう.変更後makeが通過しました.Ref
Error: error: conflicting types for '_XData32' Fix: This patch is no correct,
Following patch is right
# HG changeset patch
# User Azamat H. Hackimov <[email protected]>
# Date 1370184533 -21600
# Branch SDL-1.2
# Node ID 91ad7b43317a6387e115ecdf63a49137f47e42c8
# Parent  f7fd5c3951b9ed922fdf696f7182e71b58a13268
Fix compilation with libX11 >= 1.5.99.902.

These changes fixes bug #1769 for SDL 1.2
(http://bugzilla.libsdl.org/show_bug.cgi?id=1769).

diff -r f7fd5c3951b9 -r 91ad7b43317a configure.in
--- a/configure.in Wed Apr 17 00:56:53 2013 -0700
+++ b/configure.in Sun Jun 02 20:48:53 2013 +0600
@@ -1169,6 +1169,17 @@
             if test x$definitely_enable_video_x11_xrandr = xyes; then
                 AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRANDR)
             fi
+ AC_MSG_CHECKING(for const parameter to _XData32)
+ have_const_param_xdata32=no
+ AC_TRY_COMPILE([
+ #include <X11/Xlibint.h>
+ extern int _XData32(Display *dpy,register _Xconst long *data,unsigned len);
+ ],[
+ ],[
+ have_const_param_xdata32=yes
+ AC_DEFINE(SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32)
+ ])
+ AC_MSG_RESULT($have_const_param_xdata32)
         fi
     fi
 }
diff -r f7fd5c3951b9 -r 91ad7b43317a include/SDL_config.h.in
--- a/include/SDL_config.h.in Wed Apr 17 00:56:53 2013 -0700
+++ b/include/SDL_config.h.in Sun Jun 02 20:48:53 2013 +0600
@@ -283,6 +283,7 @@
 #undef SDL_VIDEO_DRIVER_WINDIB
 #undef SDL_VIDEO_DRIVER_WSCONS
 #undef SDL_VIDEO_DRIVER_X11
+#undef SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32
 #undef SDL_VIDEO_DRIVER_X11_DGAMOUSE
 #undef SDL_VIDEO_DRIVER_X11_DYNAMIC
 #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT
diff -r f7fd5c3951b9 -r 91ad7b43317a src/video/x11/SDL_x11sym.h
--- a/src/video/x11/SDL_x11sym.h Wed Apr 17 00:56:53 2013 -0700
+++ b/src/video/x11/SDL_x11sym.h Sun Jun 02 20:48:53 2013 +0600
@@ -165,7 +165,11 @@
  */
 #ifdef LONG64
 SDL_X11_MODULE(IO_32BIT)
-SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return)
+SDL_X11_SYM(int,_XData32,(Display *dpy,register _Xconst long *data,unsigned len),(dpy,data,len),return)
 SDL_X11_SYM(void,_XRead32,(Display *dpy,register long *data,long len),(dpy,data,len),)
 #endif