2012-02-01 48 views
1

我已經嘗試了本書中的所有內容以及所有可以找到的關於如何執行此操作並重新安裝並重新配置和重建幾次而無濟於事的所有內容。這是我的。我做了FFmpeg的在我的Ubuntu VM,並寫了下面的代碼:如何將Eclipse 11中的Eclipse Indigo鏈接到FFMPEG 8 for C++

#include "libavcodec/avcodec.h" 
#include "libavformat/avformat.h" 

#include <stdio.h> 
#include <iostream> 

using namespace std; 

int main(int argc, char* argv[]) { 

    avcodec_register_all(); 

    return 0; 
} 

這個錯誤,並說:

/home/adam/workspace/MP4 Tools/Debug/../testDriver.cpp:19: undefined reference to  `avcodec_register_all()' 
collect2: ld returned 1 exit status 

我已經包括libavcodec.a文件。項目 - >屬性 - > GCC C++鏈接器 - >庫 - >添加「avcodec」

任何人都可以想到我沒有做或忽略的東西?非常感謝。

回答

1

我張貼的解決方案here

,但不要忘了,如果你使用C++,你應該有這樣的ffmpeg標題:

extern "C"{ 
#include<libavformat/avformat.h> 
#include<libavcodec/avcodec.h> 
}