Changes between Version 1 and Version 2 of CompilationGuide/CrossCompilingForWindows


Ignore:
Timestamp:
Sep 5, 2012, 10:04:20 PM (7 years ago)
Author:
rogerdpack
Comment:

flesh out how

Legend:

Unmodified
Added
Removed
Modified
  • CompilationGuide/CrossCompilingForWindows

    v1 v2  
    1 Zeranoe has a [http://ffmpeg.zeranoe.com/blog/ script] for setting up the cross compiler, then you can use it to [http://ffmpeg.zeranoe.com/forum/viewtopic.php?f=19&t=459 compile ffmpeg and its libs].
     1= Intro =
     2
     3Basically, cross compiling FFmpeg for windows means that you use a special version of the gcc compiler (and related tools) that output a working windows executable when they're done.  You can copy it to your windows box and then use it (or use wine to run it under linux, but that kind of defeats the point).
     4
     5= Cross Compiler =
     6
     7Zeranoe has a [http://ffmpeg.zeranoe.com/blog/ script] for compiling your own local cross compiler, then you can use it to [http://ffmpeg.zeranoe.com/forum/viewtopic.php?f=19&t=459 compile ffmpeg and its libs].
     8
     9Another option is that some linux distros have packages like mingw-w64-dev or gcc-mingw-w64-i686 which might also get a working local cross compiler system.  Basically, they'll add x86_64-w64-mingw32-gcc to a directory or to the PATH somehow.  And you're ready to go.
     10
     11= Compile dependencies =
     12
     13Next cross compile any added dependencies you may want, for instead libx264.
     14
     15The script "cross_compile_ffmpeg.sh" in [https://github.com/rdp/ffmpeg-windows-build-helpers this repository] lists many dependencies.
     16
     17= Compile FFmpeg =
     18
     19Now basically configure and compile FFmpeg like
     20{{{
     21$ ./configure -enable-memalign-hack  --arch=x86   --target-os=mingw32    --cross-prefix=i686-w64-mingw32-  --pkg-config=pkg-config
     22$ make
     23}}}
     24
     25and other options if you want them, like --enable-libx264, etc.
     26
     27This should eventually create the file ffmpeg_g.exe (ffmpeg.exe with debug symbols) and ffmpeg.exe (ffmpeg.exe "stripped" of its debug symbols).  If you cross compile SDL before hand, it will also include ffplay.exe
     28
     29= Resources =
     30
     31[http://ffmpeg.arrozcru.org/wiki/index.php?title=Cross-compiling Here] are some more helpful instructions on cross compiling (the old build system used this).
     32
     33[https://github.com/rdp/ffmpeg-windows-build-helpers This repository] has a script that compiles the cross compiler locally
     34
     35You can ask questions on the [http://ffmpeg.zeranoe.com/forum/ Zeranoe Forum].