0
votes

I am trying to write a program using FFMPEG libraries. I read about in this link. I downloaded Shared and Devs files from http://ffmpeg.zeranoe.com/builds/.

I created a console project and this is the configuration:

Additional Libraries Directories enter image description here

Additional Include Directories enter image description here

And here is my code:

#include "stdafx.h"
#pragma comment (lib, "avformat.lib")
#pragma comment (lib, "avcodec.lib")
#pragma comment (lib, "avutil.lib")

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 _tmain(int argc, _TCHAR* argv[])
{
    av_register_all();
    return 0;
}

And the error I am getting is this:

Error 1 error LNK2019: unresolved external symbol _av_register_all referenced in function _wmain C:\Users\Andres\Documents\Visual Studio 2013\Projects\PruebaFFMPEG\PruebaFFMPEG\PruebaFFMPEG.obj PruebaFFMPEG

Error 2 error LNK1120: 1 unresolved externals C:\Users\Andres\Documents\Visual Studio 2013\Projects\PruebaFFMPEG\Debug\PruebaFFMPEG.exe PruebaFFMPEG

What am I missing?

1

1 Answers

0
votes

It seems that you are trying to link a 32-bit application with 64-bit libraries. Download 32-bit libraries from http://ffmpeg.zeranoe.com/builds/ or create x64 configuration for your solution.