2013-11-28 2 views
1

리눅스에서 Windows (mingw32)로 크로스 컴파일 된 ffmpeg 및 libav가 있습니다. 그래서, 내 .a 파일을 가지고 있고 내 MSVC2010 프로젝트에서 링크에 사용할 준비가되었습니다. 문제는 링크 오류가 발생하고 이유를 이해할 수 없다는 것입니다.ffmpeg/libav Windows에서 링크 문제

1>RTSPCapture.obj : error LNK2019: unresolved external symbol _avformat_free_context referenced in function "public: int __thiscall Imagsa::RTSPCapture::dumpSync(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_stringstream<char,struct std::char_traits<char>,class std::allocator<char> > &,double *,class std::vector<class Imagsa::MjpegFrame,class std::allocator<class Imagsa::MjpegFrame> > &)" ([email protected]@[email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@@[email protected]@@[email protected]@Z) 
1>RTSPCapture.obj : error LNK2019: unresolved external symbol _avio_close referenced in function "public: int __thiscall Imagsa::RTSPCapture::dumpSync(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_stringstream<char,struct std::char_traits<char>,class std::allocator<char> > &,double *,class std::vector<class Imagsa::MjpegFrame,class std::allocator<class Imagsa::MjpegFrame> > &)" ([email protected]@[email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@@[email protected]@@[email protected]@Z) 
1>RTSPCapture.obj : error LNK2019: unresolved external symbol _avcodec_close referenced in function "public: int __thiscall Imagsa::RTSPCapture::dumpSync(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_stringstream<char,struct std::char_traits<char>,class std::allocator<char> > &,double *,class std::vector<class Imagsa::MjpegFrame,class std::allocator<class Imagsa::MjpegFrame> > &)" ([email protected]@[email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@@[email protected]@@[email protected]@Z) 

아무도 무슨 일이 일어날 지 알고 있습니까?

답변

1

마지막으로 Mingw 컴파일 된 라이브러리가 VS2010 기본 응용 프로그램에서 링크 될 수 없음을 알게되었습니다.

+0

나는 그 (것)들을 과거에는 연결했다. –

2

libav * 헤더를 포함 할 때는 C 스타일 이름을 변경해야합니다.

extern "C" 
{ 
#include <libavcodec/avcodec.h> 
#include <libavcodec/avcodec.h> 
... 
} 
+0

충분하지 않습니다. .lib 정적 라이브러리를 사용하고 있습니다. –