Re: [問題] ffmpeg跟VC的編譯問題
問簡單一點好了...怎麼設定讓 VC+ffmpeg可以順暢?XD
我後來有找到FAQ
extern "C" {
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
}
這樣加完以後,就好多了..但又出現其他問題...
libavcodec.a(h263.o) : error LNK2001: unresolved external symbol ___divdi3
libavcodec.a(2) : error LNK2001: unresolved external symbol ___divdi3
libavutil.a(mathematics.o) : error LNK2001: unresolved external symbol
___divdi3
...
...
...
感覺應該是兩種編譯器彼此不相容的關係嘛...XD
因為我寫一個簡單的程式用 mingw 就可以用 gcc 編譯的很好...QQ
配上VC就一堆鳥問題...
※ 引述《nosrep (ㄎ)》之銘言:
: 我已經用 msys 編譯好 ffmpeg 了,
: 但我開了 VC的CPP專案,要套到我的 directshow程式卻發生了 link error
: 我看網路有人把 __stdcall 改成 _cdecl *就解決了,但我兩種都無法解決我的問題..
: 我已經設定好 link 到下面的檔案, VC應該是有找到檔案
: ..\ffmpeg\libavformat\libavformat.a ..\ffmpeg\libavcodec\libavcodec.a
: 但就是編譯失敗QQ.....只差一步了...
: 不知道有誰可以提點一下~謝謝
: error LNK2001: unresolved external symbol "void __stdcall
: av_register_all(void)" (?av_register_all@@YGXXZ)
: error LNK2001: unresolved external symbol "void __stdcall dump_format(struct
: AVFormatContext *,int,char const *,int)"
: (?dump_format@@YGXPAUAVFormatContext@@HPBDH@Z)
: error LNK2001: unresolved external symbol "int __stdcall
: av_find_stream_info(struct AVFormatContext *)"
: (?av_find_stream_info@@YGHPAUAVFormatContext@@@Z)
: error LNK2001: unresolved external symbol "int __stdcall
: av_open_input_file(struct AVFormatContext * *,char const *,struct
: AVInputFormat *,int,struct AVFormatParameters *)"
: (?av_open_input_file@@YGHPAPAUAVFormatContext@@PBDPAUAVInputFormat@@HPAUAVFormatParameters@@@Z)
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 220.128.189.251
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 4 篇):