作者nosrep (ㄎ)
看板Programming
标题Re: [问题] ffmpeg跟VC的编译问题
时间Wed Sep 3 00:24:32 2008
问简单一点好了...怎麽设定让 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