[Libav-user] Linking ffmpeg libraries on Windows

Gustav González xtingray at gmail.com
Thu Apr 5 02:14:56 CEST 2012


Hi,

Currently I'm trying to compile my C++ project on Windows 7.
I want to know if there are any kind of considerations about how to link the
ffmpeg libraries from a C/C++ program on MS platforms.

I downloaded these files:
http://ffmpeg.zeranoe.com/builds/win32/dev/ffmpeg-0.8-win32-dev.7z
http://ffmpeg.zeranoe.com/builds/win32/shared/ffmpeg-0.8-win32-shared.7z

For the compilation process I'm using this option and it seems to work:
-I"c:\QtSDK\Desktop\ffmpeg\include"

My linking option is this:

 -LC:/QtSDK/Desktop/ffmpeg/bin/avcodec-53.dll
-LC:/QtSDK/Desktop/ffmpeg/bin/avformat-53.dll
-LC:/QtSDK/Desktop/ffmpeg/bin/avutil-51.dll

But the linking process fails printing a lot of these messages:

./release\kffmpegmoviegenerator.o:kffmpegmoviegenerator.cpp:(.text+0x390):
undefined reference to `avcodec_close'
./release\kffmpegmoviegenerator.o:kffmpegmoviegenerator.cpp:(.text+0x39c):
undefined reference to `av_free'
./release\kffmpegmoviegenerator.o:kffmpegmoviegenerator.cpp:(.text+0x3a6):
undefined reference to `av_free'
./release\kffmpegmoviegenerator.o:kffmpegmoviegenerator.cpp:(.text+0x3b7):
undefined reference to `av_free'
./release\kffmpegmoviegenerator.o:kffmpegmoviegenerator.cpp:(.text+0x3c2):
undefined reference to `av_free'
./release\kffmpegmoviegenerator.o:kffmpegmoviegenerator.cpp:(.text+0x408):
undefined reference to `av_write_trailer'

Any hint? Any suggestion?

Thanks!

-- 
============================
  Gustav Gonzalez
  xtingray at gmail.com
============================


More information about the Libav-user mailing list