Wednesday, November 14, 2007

FFmpeg g++ and linking

I wasn't able to build a c++ program that makes use of ffmpeg libraries (libavcodec, libavutil and libavforamt).
After some tries and fails I found that in order to link correctly ffmpeg within a c++ program using g++ you need to include ffmpeg in this way:
extern "C"
{
#include "ffmpeg/avcodec.h"
#include "ffmpeg/swscale.h"
#include "ffmpeg/avformat.h"
}
(blogger don't like ffmpeg includes!!!!)

This is not needed for example in vc++.
If not doing so you will keep on getting "undefined reference" errors while linking with g++.

This is an example of building with g++ statically linking to ffmpeg:
g++ ...some options... /usr/local/lib/libavcodec.a /usr/local/lib/libavformat.a /usr/local/lib/libavutil.a /usr/lib/libz.a /usr/lib/libm.a

Monday, February 05, 2007

Stupid dotNET 2.0 configuration error

This error drive me crazy!

---------------------------
mmc.exe - Runtime Version Conflict
---------------------------
Other version of runtime is already loaded: v2.0.50727
---------------------------
OK
---------------------------

To be able to run the tool to configure 2.0 framework i needed to follow this procedure as suggested by msdn:


To run Mscorcfg.msc from the Microsoft Management Console

1. Start the Microsoft Management Console by typing the following at a command prompt: mmc.
2. On the File menu, click Add/Remove Snap-in (or press CTRL+M) to display the Add/Remove Snap-in dialog box.
3. In the Add/Remove Snap-in dialog box, click Add to display the Add Standalone Snap-in dialog box.
4. In the Add Standalone Snap-in dialog box, select a version of the .NET Framework Configuration tool, and then click Add.

If I try to save the MMC and then open the saved mmc file it fires the error again!!! This is unbelievable!