我正在嘗試使用FFMPEG庫編寫程序。我在this鏈接閱讀。我從http://ffmpeg.zeranoe.com/builds/下載了Shared和Devs文件。使用FFMPEG與Visual Studio 2013 Express的鏈接器錯誤
我創建了一個控制檯項目,這是配置:
附加庫目錄
附加包含目錄
這裏是我的代碼:
#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;
}
而且我得到的錯誤是這樣的:
錯誤1個錯誤LNK2019:解析外部符號_av_register_all 在功能_wmainÇ引用:\用戶\安德烈斯\文檔\ Visual Studio的 2013 \項目\ PruebaFFMPEG \ PruebaFFMPEG \ PruebaFFMPEG.obj PruebaFFMPEG
錯誤2錯誤LNK1120:1未解析的外部 C:\用戶\安德烈\文件\的Visual Studio 2013 \項目\ PruebaFFMPEG \調試\ PruebaFFMPEG.exe PruebaFFMPEG
我錯過了什麼?
我下載的64位版本,因爲我有一個64位的Windows,將32位工作? x64配置如何? – Andres
打開項目屬性 - >點擊Configuration Manager ... - > Active Solution Platform - > New .. - >選擇x64(見截圖http://goo.gl/54ND5t) – pogorskiy
謝謝你解決了這個問題! – Andres