Guide to building FFMpeg for Windows Mobile / Win CE

Hi all,

I after playing round with Crags guide I thought I would post what I have found. No small amount of hair pulling from me to


1. Before proceeding, you must have the Msys + MingW development environment set up. I can highly recommend this guide as a starting point. Follow this guide through until you have an environment which is sufficient for building FFMpeg on Windows.

2. Get the CeGCC cross compiler from the . The version you should get is

3. Unzip cegcc-cegcc-0.50-cygwin.tar.gz into your msys/mingw directory. Assuming you followed the guid in step 1, that will be

4. Rename the winsock 2 library found in
from libws2.a to libws2_32.a. Assuming you followed the guide in step 1 that will be

5. Modify the file errno.h found in
Remove lines 11-14:
#ifdef __COREDLL__
# include_next <errno.h>
#else /* __COREDLL__ */
and lines 106-107:
#endif /* Not __COREDLL__ */

6. Note that this is only an issue if you are ''not'' using CeGCC to build your Windows CE / Mobile application. There is an issue with the alignment of structures that contain 8-byte variables in CeGCC (see this discussion for more info). The solution for this problem involves modifying the stdint.h header file that ships with the release of CeGCC.
If the guide in step 1 was followed that will be
Modify the typedefs of the 64-bit integer variables from:
typedef long long int64_t;
typedef unsigned long long uint64_t;
typedef long long int64_t
#if defined(__GNUC__)
typedef unsigned long long uint64_t
#if defined(__GNUC__)

7. Download binutils-2.16.1, gcc-4.1.0-c-c++, newlib-1.14.0, insight-6.4, setup.exe [25.3MB] from

8. Install the gnuArm tools to the default location.

Build Process
1. Check out the latest version of the FFMpeg source from SVN. The rest of this guide will assume you checked out to c:\projects\ffmpeg.

2. Open a MSYS command window and navigate to the directory you checked FFMpeg out to:
cd /c/projects/ffmpeg

3. Add the path to the CeGCC cross compiler's bin directory to your PATH environment variable:

4. Add the path to the gnuArm tools bin directory to your PATH environment variable:
PATH=$PATH:"/C/Program Files/GNUARM/bin"

5. Configure the build by executing the following command:
./configure --enable-mingwce --cross-compile --cross-prefix=arm-wince-mingw32ce- --arch=arm --disable-static --enable-shared --disable-parsers --enable-memalign-hack --disable-ffmpeg --disable-ffplay --disable-debug
note from metalkin) It seems that ffmpeg doesn't support '--enable-mingwce' and '--cross-compile'options anymore, '--enable-cross-compile' could replace '--cross-compile' based on current ffmpeg revision.
During build, dsputil_arm_s.S makes several errors "' junk at end of line, first unrecognized character is `p'". I guess an arm assember has to be designated to compile it.
Due to the reasons, this option could be a bit out of date, I think.

6. Remove any old intermediate files
make clean

7. Start the build by executing make:

8. Once the build is finished.
make install

9. The lib and header files will now have been copied over to the directories below.
Which if you followed the guide in the prerequisites will be located in:

Have fun

Posts: 1
Joined: Thu Nov 20, 2008 4:30 pm
트랙백 0 댓글 0
prev 1 ··· 26 27 28 29 30 31 32 33 34 ··· 57 next