2014-12-09 3 views
1

Windows에서 FFmpeg와 함께 Qt Creator를 사용하고 있습니다. vs2012를 사용하여 FFmpeg를 빌드하고 프로젝트 빌드 환경의 INCLUDE 및 LIB에 경로를 지정했습니다. LNK2019 :이 오류가Qt Creator with FFmpeg 미확인

#include "mainwindow.h" 
#include <QApplication> 
#include "libavcodec\avcodec.h" 
#include "libavformat\avformat.h" 

int main(int argc, char *argv[]) 
{ 
    QApplication a(argc, argv); 
    MainWindow w; 
    w.show(); 

    av_register_all(); 

    return a.exec(); 
} 

입니다 : 내가이 코드를 수행하려고 할 때 는 그러나 나는 오류로 실행 해요되지 않은 외부 기호 "무효 __cdecl의 av_register_all (무효)"(? av_register_all @@ YAXXZ) 함수 _main에서 참조 됨

아무도 도와 줄 수 있습니까?

+1

응용 프로그램을 ffmpeg에 연결 하시겠습니까? 코드와 동일한 옵션으로 컴파일 되었습니까? – Cameron

답변

1

당신은 C lib을 C 라이브러리에 연결하고 있습니다.

extern "C" { 
#include "libavcodec\avcodec.h" 
#include "libavformat\avformat.h" 
} 
+0

LNK2019 : _main – user3790147

+0

함수에서 참조 된 확인할 수없는 외부 기호 _av_register_all이 이제는이 오류가 발생합니다. – user3790147