我想編譯this example編譯ffmpeg和opencv時出錯
on Ubunto。這是編譯命令:
g++ video.cpp -o video `pkg-config --cflags opencv` `pkg-config --libs opencv` -lpthread -lavutil -lavformat -lavcodec -lz
,這是我收到的錯誤:
/usr/local/include/libavutil/common.h:173:47: error: ‘UINT64_C’ was not declared in this scope
video.cpp: In member function ‘int FFread::init(char*)’:
video.cpp:24:56: error: ‘av_open_input_file’ was not declared in this scope
video.cpp:28:5: warning: ‘int av_find_stream_info(AVFormatContext*)’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1266) [-Wdeprecated-declarations]
video.cpp:28:35: warning: ‘int av_find_stream_info(AVFormatContext*)’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1266) [-Wdeprecated-declarations]
video.cpp:32:36: error: ‘dump_format’ was not declared in this scope
video.cpp:37:48: error: ‘CODEC_TYPE_VIDEO’ was not declared in this scope
請指教。 謝謝, Nahum
請使用代碼標籤(大括號重新格式化你的問題一個純C項目:{ }圖標),以使錯誤輸出更具可讀性。 – 2012-03-11 08:05:05