tags:

views:

1849

answers:

4

Has anyone ever tried, or had any success at getting Wascana (Eclipse CDT + MinGW for Windows) to compile FFMPEG under Windows. Apparently it is possible, there is even a tutorial at Craig Shaw's website but I have not been able to make it work.

I run ./configure on the FFMPEG source code then create a new project in Eclipse and point it at the source but it doesn't recognise it as a Makefile project. I think I need to create a builder which works with MinGW but my feeble attempts so far have been unsuccessful.

+2  A: 

Hey, I can answer my own question! After a lot of fiddling around, I have come up with the procedure:

NOTE: This is for Wascana 0.9.3 and a Sep 2008 SVN version of FFMPEG.

Prepare Environment

After installing Wascana, you'll need to update various MinGW and MSYS packages. Download and unpack the following (you can download them from the MinGW website):

MSYS packages:

  • bash-3.1
  • coreutils-5.97
  • m4-1.4.7
  • make-3.81

MinGW packages:

  • w32api-3.12
  • MinGW Runtime 3.15

Build

  1. Unpack the FFMPEG source code and configure like so (do not compile it yet):

./configure --enable-memalign-hack --disable-shared --enable-static --disable-mmx --disable-mmx2 --disable-optimizations --disable-stripping

  1. Launch Wascana/Eclipse and create a new C project.
  2. Do not select "Hello World" project, just select a Makefile project and select the MinGW toolchain.
  3. Set the project path to wherever your FFMPEG source code is.
  4. Click finish and the source should build itself!

Install

  1. Right click the project and select Make Targets > Create.
  2. In the dialog, set both the Make Target and Target name to "install".
  3. Run the target you just created. This will install the FFMPEG libraries.

Execute and Debug

  1. Open the Debug Dialog
  2. Right-click on "C/C++ Local Application" and choose "New"
  3. Fill in the project name and select the EXE you want to run (in my case, ffplay_g.exe)
  4. Go to the debugger tab and change the debugger to "MinGW gdb Debugger"

I also had to make sure a copy of SDL.dll was in the ffmpeg directory.

Phew, what an ordeal. That all worked for me, hopefully it will work for you too!

Adam Pierce
A: 

Hi Adam,

Very good article, I managed to start building FFMPEG from Wascana through your building process but when it starts to build itself

it give an error message

make all make: *** No rule to make target `all'. Stop.

and in MINGW32 I am also getting error on making command as follows

$ make make: *** No rule to make target libavdevice/libavdevice.a', needed by all'. Stop

any idea. Your this article even helped in starting building itself in Wascana

Thanks

Sounds like something went wrong during the ./configure step. Try running the ./configure command again and check for any errors produced.
Adam Pierce
A: 

install last MSYS and MinGW Cf. link text

It worked for me with MSYS and MinGW versions from the linked I gave above and revision 16967 (03/02/09) of ffmpeg. Btw, ty to Adam ;)
A: 

When I run the debugging I get "gdb.exe has encountered a problem and needs to close...."

I updated to gdb 6.8 and succeeded to debug

Roman