欢迎访问我的独立博客

Debug ffmpeg.c & ffmpeg_g.exe in Ubuntu with Eclipse

Download Eclipse

Download “Eclipse IDE for C/C++ Developers” all in one installation from  http://www.eclipse.org/downloads/

 

Uncompress and run Eclipse

After uncompressing (usually with "tar xzf eclipse.<version info here>.tar.gz"), you can simply enter the eclipse directory (with "cd eclipse") and run the Eclipse (usually using "./eclipse"). After you start the Eclipse for the first time, it will ask you for the "workspace" directory. This directory will contain your future projects in subdirectories.

【附】运行eclipse需要安装JRE(安装方法见博文:ubuntu下安装最新 jre 7)

 

Create new C++ project using existing FFmpeg's source code

In the Eclipse, go to main menu option "File - New - Project", then choose "C/C++" and then "Makefile Project with Existing Code" and navigate to the FFmpeg's source code directoryffmpeg-1.1.3.

Import Existing Code对话框中的Toolchain for Indexer Settings中选Linux GCC

Compile the source code

First of all, make sure you have c++, g++, make and other build tools installed. If you are using debian/ubuntu, you can type "apt-get install build-essential". Before you compile the source code for the first time, you'll have to go to your ffmpeg root directory ("ffmpeg-1.1.3") and type "./configure". After it finishes, go back to Eclipse and use the main menu option "Project - Build All".

我用的选项:

./configure --enable-gpl --disable-optimizations --disable-ffplay --disable-asm –prefix=/usr

可以加—enable-shared

如果想在windows下开发,有个网站有:

Dev packages provide the headers and .lib/.dll.a files required to use the .dll files in other programs.

http://ffmpeg.zeranoe.com/builds/win32/dev/

 

右键点击ffmpeg_gdebug as->Local c/c++ Application

加调试初始参数:

右键点击ffmpeg_gdebug as-> Debug Configuration

Step Over (类似vsF10) / Step Into (类似vsF11)

posted @ 2013-03-23 22:03  github.com/starRTC  阅读(936)  评论(0编辑  收藏  举报