As the title says, I have been trying to get ffmpeg/libav libraries to work in MSVC++ 2010. However, I keep running in the following error while coding on debug mode.
code:
extern "C"
{
#ifndef __STDC_CONSTANT_MACROS
#define __STDC_CONSTANT_MACROS
#endif
#include <libavcodec\avcodec.h>
#include <libavformat\avformat.h>
#include <libswscale\swscale.h>
#include <libavutil\avutil.h>
}
int main( int argc, char* argv[] )
{
av_register_all();
return 0;
}
console:
1>------ Build started: Project: ffmpeg, Configuration: Debug Win32 ------
1>ffmpeg.obj : error LNK2019: unresolved external symbol _av_register_all referenced in function _main
1>C:\Users\okki\documents\visual studio 2010\Projects\ffmpeg\Debug\ffmpeg.exe : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I used zeranoe's latest build git-56ba331 (2013-05-14).
And I have tried the following to fix this:
- configuring the project to look for both the x64 and x86 libraries.
- Add the DLLs from the 'shared' package to both library folders.
- Add the library directory to both the linker options and VC++ Directories.
I have been stuck on this for a while, and any suggestion can help. If any extra info is needed I will happily provide.