Googling reveals that this has been fixed in gcc 4.2 which is not released yet so you'd have to compile it yourself from svn source. Now, there are instructions for compiling (experimental) 4.1 so for the sake of exercise I decided to try that. As it turns out, the error message is actually gone when ffmpeg (and all external libraries that I use) are compiled with this new version. Someone is bound to know why, but I haven't figured it out yet - IIRC I have read that the error is NOT supposed to disappear with 4.1.2. Well, what do I know. Anyway below are the steps that I followed, lifted from the mingw wiki and slightly modified:
- Download latest stable gcc tarball
- Install latest MSYS/Mingw according to the "FFmpeg on Windows" wiki. However, use the latest updates from the Mingw site
- Install the additional stuff mentioned in the mingw wiki
- Create two directories in the msys directory, one for the clean source (I called it gccsource) and one work directory where the actual compile happens
- Unpack the gcc tarball in the source directory
- cd to the work directory and run the following (prefix is where the new gcc should be installed):
../gccsource/configure --prefix=/gcc412 --includedir=/mingw/include --libdir=/mingw/lib --host=mingw32 --target=mingw32 --program-prefix="" --with-as=/mingw/bin/as.exe --with-ld=/mingw/bin/ld.exe --with-gcc --with-gnu-ld --with-gnu-as --enable-threads --disable-nls --enable-languages=c,c++ --disable-win32-registry --disable-shared --without-x --enable-interpreter --enable-hash-synchronization --enable-libstdcxx-debug
make CFLAGS="-O2 -fomit-frame-pointer" CXXFLAGS="-mthreads -fno-omit-frame-pointer -O2" LDFLAGS=-s bootstrap2
make install
PATH=/gcc412/bin:$PATH
gcc -v (to check things worked)
Also, remember to modify PATH so the new version is used if you want. Don't replace the old mingw version of gcc in case you run into problems.
So there it is. With the new version I recompiled all external libraries and ffmpeg itself and have had no problems at all. Your mileage may vary. OTOH you might want to wait for mingw to release its patched gcc 4.2, which apparently should happen relatively soon after it is formally released.
No comments:
Post a Comment