Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OpenCV2.4.3 ffmpeg multiple definition

I'm building OpenCV2.4.3 on ubuntu12.04, it stops here.

Linking CXX executable ../../bin/opencv_perf_gpu ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::init()': ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG4initEv+0x0): multiple definition ofCvCapture_FFMPEG::init()' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4initEv+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::close()': ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG5closeEv+0x0): multiple definition ofCvCapture_FFMPEG::close()' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG5closeEv+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::open(char const*)': ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKc+0x0): multiple definition ofCvCapture_FFMPEG::open(char const)' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKc+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::retrieveFrame(int, unsigned char**, int*, int*, int*, int*)': ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG13retrieveFrameEiPPhPiS2_S2_S2_+0x0): multiple definition ofCvCapture_FFMPEG::retrieveFrame(int, unsigned char, int, int, int, int)' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG13retrieveFrameEiPPhPiS2_S2_S2_+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::r2d(AVRational)': ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG3r2dE10AVRational+0x0): multiple definition ofCvCapture_FFMPEG::r2d(AVRational)' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG3r2dE10AVRational+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::get_duration_sec()': ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG16get_duration_secEv+0x0): multiple definition ofCvCapture_FFMPEG::get_duration_sec()' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG16get_duration_secEv+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::get_bitrate()': ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG11get_bitrateEv+0x0): multiple definition ofCvCapture_FFMPEG::get_bitrate()' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG11get_bitrateEv+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::get_fps()': ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG7get_fpsEv+0x0): multiple definition ofCvCapture_FFMPEG::get_fps()' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG7get_fpsEv+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::get_total_frames()': ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG16get_total_framesEv+0x0): multiple definition ofCvCapture_FFMPEG::get_total_frames()' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG16get_total_framesEv+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::getProperty(int)': ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG11getPropertyEi+0x0): multiple definition ofCvCapture_FFMPEG::getProperty(int)' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG11getPropertyEi+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::dts_to_sec(long long)': ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG10dts_to_secEx+0x0): multiple definition ofCvCapture_FFMPEG::dts_to_sec(long long)' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG10dts_to_secEx+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::dts_to_frame_number(long long)': ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG19dts_to_frame_numberEx+0x0): multiple definition ofCvCapture_FFMPEG::dts_to_frame_number(long long)' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG19dts_to_frame_numberEx+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::grabFrame()': ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG9grabFrameEv+0x0): multiple definition ofCvCapture_FFMPEG::grabFrame()' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG9grabFrameEv+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::seek(long long)': ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG4seekEx+0x0): multiple definition ofCvCapture_FFMPEG::seek(long long)' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4seekEx+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::seek(double)': ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG4seekEd+0x0): multiple definition ofCvCapture_FFMPEG::seek(double)' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4seekEd+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::setProperty(int, double)': ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG11setPropertyEid+0x0): multiple definition ofCvCapture_FFMPEG::setProperty(int, double)' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG11setPropertyEid+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvVideoWriter_FFMPEG::init()': ffmpeg_video_source.cpp:(.text._ZN20CvVideoWriter_FFMPEG4initEv+0x0): multiple definition ofCvVideoWriter_FFMPEG::init()' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4initEv+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvVideoWriter_FFMPEG::writeFrame(unsigned char const*, int, int, int, int, int)': ffmpeg_video_source.cpp:(.text._ZN20CvVideoWriter_FFMPEG10writeFrameEPKhiiiii+0x0): multiple definition ofCvVideoWriter_FFMPEG::writeFrame(unsigned char const, int, int, int, int, int)' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG10writeFrameEPKhiiiii+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvVideoWriter_FFMPEG::close()': ffmpeg_video_source.cpp:(.text._ZN20CvVideoWriter_FFMPEG5closeEv+0x0): multiple definition ofCvVideoWriter_FFMPEG::close()' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG5closeEv+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvVideoWriter_FFMPEG::open(char const*, int, double, int, int, bool)': ffmpeg_video_source.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiib+0x0): multiple definition ofCvVideoWriter_FFMPEG::open(char const, int, double, int, int, bool)' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiib+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvCreateFileCapture_FFMPEG': ffmpeg_video_source.cpp:(.text.cvCreateFileCapture_FFMPEG+0x0): multiple definition ofcvCreateFileCapture_FFMPEG' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvCreateFileCapture_FFMPEG+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvReleaseCapture_FFMPEG': ffmpeg_video_source.cpp:(.text.cvReleaseCapture_FFMPEG+0x0): multiple definition ofcvReleaseCapture_FFMPEG' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvReleaseCapture_FFMPEG+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvSetCaptureProperty_FFMPEG': ffmpeg_video_source.cpp:(.text.cvSetCaptureProperty_FFMPEG+0x0): multiple definition ofcvSetCaptureProperty_FFMPEG' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvSetCaptureProperty_FFMPEG+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvGetCaptureProperty_FFMPEG': ffmpeg_video_source.cpp:(.text.cvGetCaptureProperty_FFMPEG+0x0): multiple definition ofcvGetCaptureProperty_FFMPEG' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvGetCaptureProperty_FFMPEG+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvGrabFrame_FFMPEG': ffmpeg_video_source.cpp:(.text.cvGrabFrame_FFMPEG+0x0): multiple definition ofcvGrabFrame_FFMPEG' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvGrabFrame_FFMPEG+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvRetrieveFrame_FFMPEG': ffmpeg_video_source.cpp:(.text.cvRetrieveFrame_FFMPEG+0x0): multiple definition ofcvRetrieveFrame_FFMPEG' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvRetrieveFrame_FFMPEG+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvCreateVideoWriter_FFMPEG': ffmpeg_video_source.cpp:(.text.cvCreateVideoWriter_FFMPEG+0x0): multiple definition ofcvCreateVideoWriter_FFMPEG' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvCreateVideoWriter_FFMPEG+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvReleaseVideoWriter_FFMPEG': ffmpeg_video_source.cpp:(.text.cvReleaseVideoWriter_FFMPEG+0x0): multiple definition ofcvReleaseVideoWriter_FFMPEG' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvReleaseVideoWriter_FFMPEG+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvWriteFrame_FFMPEG': ffmpeg_video_source.cpp:(.text.cvWriteFrame_FFMPEG+0x0): multiple definition ofcvWriteFrame_FFMPEG' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvWriteFrame_FFMPEG+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function OutputMediaStream_FFMPEG::close()': ffmpeg_video_source.cpp:(.text._ZN24OutputMediaStream_FFMPEG5closeEv+0x0): multiple definition ofOutputMediaStream_FFMPEG::close()' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN24OutputMediaStream_FFMPEG5closeEv+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function OutputMediaStream_FFMPEG::addVideoStream(AVFormatContext*, CodecID, int, int, int, double, PixelFormat)': ffmpeg_video_source.cpp:(.text._ZN24OutputMediaStream_FFMPEG14addVideoStreamEP15AVFormatContext7CodecIDiiid11PixelFormat+0x0): multiple definition ofOutputMediaStream_FFMPEG::addVideoStream(AVFormatContext, CodecID, int, int, int, double, PixelFormat)' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN24OutputMediaStream_FFMPEG14addVideoStreamEP15AVFormatContext7CodecIDiiid11PixelFormat+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function OutputMediaStream_FFMPEG::open(char const*, int, int, double)': ffmpeg_video_source.cpp:(.text._ZN24OutputMediaStream_FFMPEG4openEPKciid+0x0): multiple definition ofOutputMediaStream_FFMPEG::open(char const, int, int, double)' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN24OutputMediaStream_FFMPEG4openEPKciid+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function OutputMediaStream_FFMPEG::write(unsigned char*, int, int)': ffmpeg_video_source.cpp:(.text._ZN24OutputMediaStream_FFMPEG5writeEPhii+0x0): multiple definition ofOutputMediaStream_FFMPEG::write(unsigned char, int, int)' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN24OutputMediaStream_FFMPEG5writeEPhii+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function create_OutputMediaStream_FFMPEG': ffmpeg_video_source.cpp:(.text.create_OutputMediaStream_FFMPEG+0x0): multiple definition ofcreate_OutputMediaStream_FFMPEG' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.create_OutputMediaStream_FFMPEG+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function release_OutputMediaStream_FFMPEG': ffmpeg_video_source.cpp:(.text.release_OutputMediaStream_FFMPEG+0x0): multiple definition ofrelease_OutputMediaStream_FFMPEG' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.release_OutputMediaStream_FFMPEG+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function write_OutputMediaStream_FFMPEG': ffmpeg_video_source.cpp:(.text.write_OutputMediaStream_FFMPEG+0x0): multiple definition ofwrite_OutputMediaStream_FFMPEG' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.write_OutputMediaStream_FFMPEG+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function InputMediaStream_FFMPEG::open(char const*, int*, int*, int*, int*)': ffmpeg_video_source.cpp:(.text._ZN23InputMediaStream_FFMPEG4openEPKcPiS2_S2_S2_+0x0): multiple definition ofInputMediaStream_FFMPEG::open(char const, int, int, int, int)' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN23InputMediaStream_FFMPEG4openEPKcPiS2_S2_S2_+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function InputMediaStream_FFMPEG::close()': ffmpeg_video_source.cpp:(.text._ZN23InputMediaStream_FFMPEG5closeEv+0x0): multiple definition ofInputMediaStream_FFMPEG::close()' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN23InputMediaStream_FFMPEG5closeEv+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function release_InputMediaStream_FFMPEG': ffmpeg_video_source.cpp:(.text.release_InputMediaStream_FFMPEG+0x0): multiple definition ofrelease_InputMediaStream_FFMPEG' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.release_InputMediaStream_FFMPEG+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function create_InputMediaStream_FFMPEG': ffmpeg_video_source.cpp:(.text.create_InputMediaStream_FFMPEG+0x0): multiple definition ofcreate_InputMediaStream_FFMPEG' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.create_InputMediaStream_FFMPEG+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function InputMediaStream_FFMPEG::read(unsigned char**, int*, int*)': ffmpeg_video_source.cpp:(.text._ZN23InputMediaStream_FFMPEG4readEPPhPiS2_+0x0): multiple definition ofInputMediaStream_FFMPEG::read(unsigned char, int, int)' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN23InputMediaStream_FFMPEG4readEPPhPiS2_+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function read_InputMediaStream_FFMPEG': ffmpeg_video_source.cpp:(.text.read_InputMediaStream_FFMPEG+0x0): multiple definition ofread_InputMediaStream_FFMPEG' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.read_InputMediaStream_FFMPEG+0x0): first defined here collect2: ld 返回 1 make[2]: [bin/opencv_perf_gpu] 错误 1 make[1]: [modules/gpu/CMakeFiles/opencv_perf_gpu.dir/all] 错误 2 make: ** [all] 错误 2

Some functions are defined by two files of OpenCV, but I don't know how to deal with it.

OpenCV2.4.3 ffmpeg multiple definition

I'm building OpenCV2.4.3 on ubuntu12.04, it stops here.

Linking CXX executable ../../bin/opencv_perf_gpu ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::init()': ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG4initEv+0x0): multiple definition ofCvCapture_FFMPEG::init()' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4initEv+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::close()': ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG5closeEv+0x0): multiple definition ofCvCapture_FFMPEG::close()' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG5closeEv+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::open(char const*)': ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKc+0x0): multiple definition ofCvCapture_FFMPEG::open(char const)' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKc+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::retrieveFrame(int, unsigned char**, int*, int*, int*, int*)': ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG13retrieveFrameEiPPhPiS2_S2_S2_+0x0): multiple definition ofCvCapture_FFMPEG::retrieveFrame(int, unsigned char, int, int, int, int)' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG13retrieveFrameEiPPhPiS2_S2_S2_+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::r2d(AVRational)': ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG3r2dE10AVRational+0x0): multiple definition ofCvCapture_FFMPEG::r2d(AVRational)' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG3r2dE10AVRational+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::get_duration_sec()': ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG16get_duration_secEv+0x0): multiple definition ofCvCapture_FFMPEG::get_duration_sec()' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG16get_duration_secEv+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::get_bitrate()': ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG11get_bitrateEv+0x0): multiple definition ofCvCapture_FFMPEG::get_bitrate()' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG11get_bitrateEv+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::get_fps()': ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG7get_fpsEv+0x0): multiple definition ofCvCapture_FFMPEG::get_fps()' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG7get_fpsEv+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::get_total_frames()': ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG16get_total_framesEv+0x0): multiple definition ofCvCapture_FFMPEG::get_total_frames()' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG16get_total_framesEv+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::getProperty(int)': ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG11getPropertyEi+0x0): multiple definition ofCvCapture_FFMPEG::getProperty(int)' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG11getPropertyEi+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::dts_to_sec(long long)': ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG10dts_to_secEx+0x0): multiple definition ofCvCapture_FFMPEG::dts_to_sec(long long)' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG10dts_to_secEx+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::dts_to_frame_number(long long)': ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG19dts_to_frame_numberEx+0x0): multiple definition ofCvCapture_FFMPEG::dts_to_frame_number(long long)' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG19dts_to_frame_numberEx+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::grabFrame()': ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG9grabFrameEv+0x0): multiple definition ofCvCapture_FFMPEG::grabFrame()' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG9grabFrameEv+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::seek(long long)': ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG4seekEx+0x0): multiple definition ofCvCapture_FFMPEG::seek(long long)' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4seekEx+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::seek(double)': ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG4seekEd+0x0): multiple definition ofCvCapture_FFMPEG::seek(double)' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4seekEd+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::setProperty(int, double)': ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG11setPropertyEid+0x0): multiple definition ofCvCapture_FFMPEG::setProperty(int, double)' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG11setPropertyEid+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvVideoWriter_FFMPEG::init()': ffmpeg_video_source.cpp:(.text._ZN20CvVideoWriter_FFMPEG4initEv+0x0): multiple definition ofCvVideoWriter_FFMPEG::init()' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4initEv+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvVideoWriter_FFMPEG::writeFrame(unsigned char const*, int, int, int, int, int)': ffmpeg_video_source.cpp:(.text._ZN20CvVideoWriter_FFMPEG10writeFrameEPKhiiiii+0x0): multiple definition ofCvVideoWriter_FFMPEG::writeFrame(unsigned char const, int, int, int, int, int)' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG10writeFrameEPKhiiiii+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvVideoWriter_FFMPEG::close()': ffmpeg_video_source.cpp:(.text._ZN20CvVideoWriter_FFMPEG5closeEv+0x0): multiple definition ofCvVideoWriter_FFMPEG::close()' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG5closeEv+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvVideoWriter_FFMPEG::open(char const*, int, double, int, int, bool)': ffmpeg_video_source.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiib+0x0): multiple definition ofCvVideoWriter_FFMPEG::open(char const, int, double, int, int, bool)' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiib+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvCreateFileCapture_FFMPEG': ffmpeg_video_source.cpp:(.text.cvCreateFileCapture_FFMPEG+0x0): multiple definition ofcvCreateFileCapture_FFMPEG' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvCreateFileCapture_FFMPEG+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvReleaseCapture_FFMPEG': ffmpeg_video_source.cpp:(.text.cvReleaseCapture_FFMPEG+0x0): multiple definition ofcvReleaseCapture_FFMPEG' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvReleaseCapture_FFMPEG+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvSetCaptureProperty_FFMPEG': ffmpeg_video_source.cpp:(.text.cvSetCaptureProperty_FFMPEG+0x0): multiple definition ofcvSetCaptureProperty_FFMPEG' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvSetCaptureProperty_FFMPEG+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvGetCaptureProperty_FFMPEG': ffmpeg_video_source.cpp:(.text.cvGetCaptureProperty_FFMPEG+0x0): multiple definition ofcvGetCaptureProperty_FFMPEG' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvGetCaptureProperty_FFMPEG+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvGrabFrame_FFMPEG': ffmpeg_video_source.cpp:(.text.cvGrabFrame_FFMPEG+0x0): multiple definition ofcvGrabFrame_FFMPEG' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvGrabFrame_FFMPEG+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvRetrieveFrame_FFMPEG': ffmpeg_video_source.cpp:(.text.cvRetrieveFrame_FFMPEG+0x0): multiple definition ofcvRetrieveFrame_FFMPEG' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvRetrieveFrame_FFMPEG+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvCreateVideoWriter_FFMPEG': ffmpeg_video_source.cpp:(.text.cvCreateVideoWriter_FFMPEG+0x0): multiple definition ofcvCreateVideoWriter_FFMPEG' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvCreateVideoWriter_FFMPEG+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvReleaseVideoWriter_FFMPEG': ffmpeg_video_source.cpp:(.text.cvReleaseVideoWriter_FFMPEG+0x0): multiple definition ofcvReleaseVideoWriter_FFMPEG' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvReleaseVideoWriter_FFMPEG+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvWriteFrame_FFMPEG': ffmpeg_video_source.cpp:(.text.cvWriteFrame_FFMPEG+0x0): multiple definition ofcvWriteFrame_FFMPEG' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvWriteFrame_FFMPEG+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function OutputMediaStream_FFMPEG::close()': ffmpeg_video_source.cpp:(.text._ZN24OutputMediaStream_FFMPEG5closeEv+0x0): multiple definition ofOutputMediaStream_FFMPEG::close()' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN24OutputMediaStream_FFMPEG5closeEv+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function OutputMediaStream_FFMPEG::addVideoStream(AVFormatContext*, CodecID, int, int, int, double, PixelFormat)': ffmpeg_video_source.cpp:(.text._ZN24OutputMediaStream_FFMPEG14addVideoStreamEP15AVFormatContext7CodecIDiiid11PixelFormat+0x0): multiple definition ofOutputMediaStream_FFMPEG::addVideoStream(AVFormatContext, CodecID, int, int, int, double, PixelFormat)' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN24OutputMediaStream_FFMPEG14addVideoStreamEP15AVFormatContext7CodecIDiiid11PixelFormat+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function OutputMediaStream_FFMPEG::open(char const*, int, int, double)': ffmpeg_video_source.cpp:(.text._ZN24OutputMediaStream_FFMPEG4openEPKciid+0x0): multiple definition ofOutputMediaStream_FFMPEG::open(char const, int, int, double)' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN24OutputMediaStream_FFMPEG4openEPKciid+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function OutputMediaStream_FFMPEG::write(unsigned char*, int, int)': ffmpeg_video_source.cpp:(.text._ZN24OutputMediaStream_FFMPEG5writeEPhii+0x0): multiple definition ofOutputMediaStream_FFMPEG::write(unsigned char, int, int)' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN24OutputMediaStream_FFMPEG5writeEPhii+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function create_OutputMediaStream_FFMPEG': ffmpeg_video_source.cpp:(.text.create_OutputMediaStream_FFMPEG+0x0): multiple definition ofcreate_OutputMediaStream_FFMPEG' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.create_OutputMediaStream_FFMPEG+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function release_OutputMediaStream_FFMPEG': ffmpeg_video_source.cpp:(.text.release_OutputMediaStream_FFMPEG+0x0): multiple definition ofrelease_OutputMediaStream_FFMPEG' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.release_OutputMediaStream_FFMPEG+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function write_OutputMediaStream_FFMPEG': ffmpeg_video_source.cpp:(.text.write_OutputMediaStream_FFMPEG+0x0): multiple definition ofwrite_OutputMediaStream_FFMPEG' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.write_OutputMediaStream_FFMPEG+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function InputMediaStream_FFMPEG::open(char const*, int*, int*, int*, int*)': ffmpeg_video_source.cpp:(.text._ZN23InputMediaStream_FFMPEG4openEPKcPiS2_S2_S2_+0x0): multiple definition ofInputMediaStream_FFMPEG::open(char const, int, int, int, int)' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN23InputMediaStream_FFMPEG4openEPKcPiS2_S2_S2_+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function InputMediaStream_FFMPEG::close()': ffmpeg_video_source.cpp:(.text._ZN23InputMediaStream_FFMPEG5closeEv+0x0): multiple definition ofInputMediaStream_FFMPEG::close()' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN23InputMediaStream_FFMPEG5closeEv+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function release_InputMediaStream_FFMPEG': ffmpeg_video_source.cpp:(.text.release_InputMediaStream_FFMPEG+0x0): multiple definition ofrelease_InputMediaStream_FFMPEG' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.release_InputMediaStream_FFMPEG+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function create_InputMediaStream_FFMPEG': ffmpeg_video_source.cpp:(.text.create_InputMediaStream_FFMPEG+0x0): multiple definition ofcreate_InputMediaStream_FFMPEG' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.create_InputMediaStream_FFMPEG+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function InputMediaStream_FFMPEG::read(unsigned char**, int*, int*)': ffmpeg_video_source.cpp:(.text._ZN23InputMediaStream_FFMPEG4readEPPhPiS2_+0x0): multiple definition ofInputMediaStream_FFMPEG::read(unsigned char, int, int)' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN23InputMediaStream_FFMPEG4readEPPhPiS2_+0x0): first defined here ../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function read_InputMediaStream_FFMPEG': ffmpeg_video_source.cpp:(.text.read_InputMediaStream_FFMPEG+0x0): multiple definition ofread_InputMediaStream_FFMPEG' ../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.read_InputMediaStream_FFMPEG+0x0): first defined here collect2: ld 返回 returns 1 make[2]: [bin/opencv_perf_gpu] 错误 error 1 make[1]: [modules/gpu/CMakeFiles/opencv_perf_gpu.dir/all] 错误 errors 2 make: ** [all] 错误 errors 2

Some functions are defined by two files of OpenCV, but I don't know So how to deal with it.solve this?

click to hide/show revision 3
No.3 Revision

OpenCV2.4.3 ffmpeg multiple definition

I'm building OpenCV2.4.3 OpenCV 2.4.3 on ubuntu12.04, ubuntu 12.04, it stops here.

Linking CXX executable ../../bin/opencv_perf_gpu
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::init()':
`CvCapture_FFMPEG::init()':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG4initEv+0x0): multiple definition ofCvCapture_FFMPEG::init()'
of `CvCapture_FFMPEG::init()'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4initEv+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::close()':
`CvCapture_FFMPEG::close()':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG5closeEv+0x0): multiple definition ofCvCapture_FFMPEG::close()'
of `CvCapture_FFMPEG::close()'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG5closeEv+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::open(char `CvCapture_FFMPEG::open(char const*)':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKc+0x0): multiple definition ofCvCapture_FFMPEG::open(char const)'
of `CvCapture_FFMPEG::open(char const*)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKc+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::retrieveFrame(int, `CvCapture_FFMPEG::retrieveFrame(int, unsigned char**, int*, int*, int*, int*)':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG13retrieveFrameEiPPhPiS2_S2_S2_+0x0): multiple definition ofCvCapture_FFMPEG::retrieveFrame(int, of `CvCapture_FFMPEG::retrieveFrame(int, unsigned char, int, int, int, int)'
char**, int*, int*, int*, int*)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG13retrieveFrameEiPPhPiS2_S2_S2_+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::r2d(AVRational)':
`CvCapture_FFMPEG::r2d(AVRational)':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG3r2dE10AVRational+0x0): multiple definition ofCvCapture_FFMPEG::r2d(AVRational)'
of `CvCapture_FFMPEG::r2d(AVRational)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG3r2dE10AVRational+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::get_duration_sec()':
`CvCapture_FFMPEG::get_duration_sec()':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG16get_duration_secEv+0x0): multiple definition ofCvCapture_FFMPEG::get_duration_sec()'
of `CvCapture_FFMPEG::get_duration_sec()'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG16get_duration_secEv+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::get_bitrate()':
`CvCapture_FFMPEG::get_bitrate()':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG11get_bitrateEv+0x0): multiple definition ofCvCapture_FFMPEG::get_bitrate()'
of `CvCapture_FFMPEG::get_bitrate()'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG11get_bitrateEv+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::get_fps()':
`CvCapture_FFMPEG::get_fps()':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG7get_fpsEv+0x0): multiple definition ofCvCapture_FFMPEG::get_fps()'
of `CvCapture_FFMPEG::get_fps()'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG7get_fpsEv+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::get_total_frames()':
`CvCapture_FFMPEG::get_total_frames()':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG16get_total_framesEv+0x0): multiple definition ofCvCapture_FFMPEG::get_total_frames()'
of `CvCapture_FFMPEG::get_total_frames()'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG16get_total_framesEv+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::getProperty(int)':
`CvCapture_FFMPEG::getProperty(int)':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG11getPropertyEi+0x0): multiple definition ofCvCapture_FFMPEG::getProperty(int)'
of `CvCapture_FFMPEG::getProperty(int)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG11getPropertyEi+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::dts_to_sec(long `CvCapture_FFMPEG::dts_to_sec(long long)':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG10dts_to_secEx+0x0): multiple definition ofCvCapture_FFMPEG::dts_to_sec(long of `CvCapture_FFMPEG::dts_to_sec(long long)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG10dts_to_secEx+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::dts_to_frame_number(long `CvCapture_FFMPEG::dts_to_frame_number(long long)':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG19dts_to_frame_numberEx+0x0): multiple definition ofCvCapture_FFMPEG::dts_to_frame_number(long of `CvCapture_FFMPEG::dts_to_frame_number(long long)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG19dts_to_frame_numberEx+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::grabFrame()':
`CvCapture_FFMPEG::grabFrame()':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG9grabFrameEv+0x0): multiple definition ofCvCapture_FFMPEG::grabFrame()'
of `CvCapture_FFMPEG::grabFrame()'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG9grabFrameEv+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::seek(long `CvCapture_FFMPEG::seek(long long)':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG4seekEx+0x0): multiple definition ofCvCapture_FFMPEG::seek(long of `CvCapture_FFMPEG::seek(long long)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4seekEx+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::seek(double)':
`CvCapture_FFMPEG::seek(double)':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG4seekEd+0x0): multiple definition ofCvCapture_FFMPEG::seek(double)'
of `CvCapture_FFMPEG::seek(double)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4seekEd+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvCapture_FFMPEG::setProperty(int, `CvCapture_FFMPEG::setProperty(int, double)':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG11setPropertyEid+0x0): multiple definition ofCvCapture_FFMPEG::setProperty(int, of `CvCapture_FFMPEG::setProperty(int, double)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG11setPropertyEid+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvVideoWriter_FFMPEG::init()':
`CvVideoWriter_FFMPEG::init()':
ffmpeg_video_source.cpp:(.text._ZN20CvVideoWriter_FFMPEG4initEv+0x0): multiple definition ofCvVideoWriter_FFMPEG::init()'
of `CvVideoWriter_FFMPEG::init()'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4initEv+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvVideoWriter_FFMPEG::writeFrame(unsigned `CvVideoWriter_FFMPEG::writeFrame(unsigned char const*, int, int, int, int, int)':
ffmpeg_video_source.cpp:(.text._ZN20CvVideoWriter_FFMPEG10writeFrameEPKhiiiii+0x0): multiple definition ofCvVideoWriter_FFMPEG::writeFrame(unsigned of `CvVideoWriter_FFMPEG::writeFrame(unsigned char const, const*, int, int, int, int, int)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG10writeFrameEPKhiiiii+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvVideoWriter_FFMPEG::close()':
`CvVideoWriter_FFMPEG::close()':
ffmpeg_video_source.cpp:(.text._ZN20CvVideoWriter_FFMPEG5closeEv+0x0): multiple definition ofCvVideoWriter_FFMPEG::close()'
of `CvVideoWriter_FFMPEG::close()'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG5closeEv+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function CvVideoWriter_FFMPEG::open(char `CvVideoWriter_FFMPEG::open(char const*, int, double, int, int, bool)':
ffmpeg_video_source.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiib+0x0): multiple definition ofCvVideoWriter_FFMPEG::open(char const, of `CvVideoWriter_FFMPEG::open(char const*, int, double, int, int, bool)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiib+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvCreateFileCapture_FFMPEG':
`cvCreateFileCapture_FFMPEG':
ffmpeg_video_source.cpp:(.text.cvCreateFileCapture_FFMPEG+0x0): multiple definition ofcvCreateFileCapture_FFMPEG'
of `cvCreateFileCapture_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvCreateFileCapture_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvReleaseCapture_FFMPEG':
`cvReleaseCapture_FFMPEG':
ffmpeg_video_source.cpp:(.text.cvReleaseCapture_FFMPEG+0x0): multiple definition ofcvReleaseCapture_FFMPEG'
of `cvReleaseCapture_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvReleaseCapture_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvSetCaptureProperty_FFMPEG':
`cvSetCaptureProperty_FFMPEG':
ffmpeg_video_source.cpp:(.text.cvSetCaptureProperty_FFMPEG+0x0): multiple definition ofcvSetCaptureProperty_FFMPEG'
of `cvSetCaptureProperty_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvSetCaptureProperty_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvGetCaptureProperty_FFMPEG':
`cvGetCaptureProperty_FFMPEG':
ffmpeg_video_source.cpp:(.text.cvGetCaptureProperty_FFMPEG+0x0): multiple definition ofcvGetCaptureProperty_FFMPEG'
of `cvGetCaptureProperty_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvGetCaptureProperty_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvGrabFrame_FFMPEG':
`cvGrabFrame_FFMPEG':
ffmpeg_video_source.cpp:(.text.cvGrabFrame_FFMPEG+0x0): multiple definition ofcvGrabFrame_FFMPEG'
of `cvGrabFrame_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvGrabFrame_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvRetrieveFrame_FFMPEG':
`cvRetrieveFrame_FFMPEG':
ffmpeg_video_source.cpp:(.text.cvRetrieveFrame_FFMPEG+0x0): multiple definition ofcvRetrieveFrame_FFMPEG'
of `cvRetrieveFrame_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvRetrieveFrame_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvCreateVideoWriter_FFMPEG':
`cvCreateVideoWriter_FFMPEG':
ffmpeg_video_source.cpp:(.text.cvCreateVideoWriter_FFMPEG+0x0): multiple definition ofcvCreateVideoWriter_FFMPEG'
of `cvCreateVideoWriter_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvCreateVideoWriter_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvReleaseVideoWriter_FFMPEG':
`cvReleaseVideoWriter_FFMPEG':
ffmpeg_video_source.cpp:(.text.cvReleaseVideoWriter_FFMPEG+0x0): multiple definition ofcvReleaseVideoWriter_FFMPEG'
of `cvReleaseVideoWriter_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvReleaseVideoWriter_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function cvWriteFrame_FFMPEG':
`cvWriteFrame_FFMPEG':
ffmpeg_video_source.cpp:(.text.cvWriteFrame_FFMPEG+0x0): multiple definition ofcvWriteFrame_FFMPEG'
of `cvWriteFrame_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvWriteFrame_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function OutputMediaStream_FFMPEG::close()':
`OutputMediaStream_FFMPEG::close()':
ffmpeg_video_source.cpp:(.text._ZN24OutputMediaStream_FFMPEG5closeEv+0x0): multiple definition ofOutputMediaStream_FFMPEG::close()'
of `OutputMediaStream_FFMPEG::close()'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN24OutputMediaStream_FFMPEG5closeEv+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function OutputMediaStream_FFMPEG::addVideoStream(AVFormatContext*, `OutputMediaStream_FFMPEG::addVideoStream(AVFormatContext*, CodecID, int, int, int, double, PixelFormat)':
ffmpeg_video_source.cpp:(.text._ZN24OutputMediaStream_FFMPEG14addVideoStreamEP15AVFormatContext7CodecIDiiid11PixelFormat+0x0): multiple definition ofOutputMediaStream_FFMPEG::addVideoStream(AVFormatContext, of `OutputMediaStream_FFMPEG::addVideoStream(AVFormatContext*, CodecID, int, int, int, double, PixelFormat)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN24OutputMediaStream_FFMPEG14addVideoStreamEP15AVFormatContext7CodecIDiiid11PixelFormat+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function OutputMediaStream_FFMPEG::open(char `OutputMediaStream_FFMPEG::open(char const*, int, int, double)':
ffmpeg_video_source.cpp:(.text._ZN24OutputMediaStream_FFMPEG4openEPKciid+0x0): multiple definition ofOutputMediaStream_FFMPEG::open(char const, of `OutputMediaStream_FFMPEG::open(char const*, int, int, double)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN24OutputMediaStream_FFMPEG4openEPKciid+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function OutputMediaStream_FFMPEG::write(unsigned `OutputMediaStream_FFMPEG::write(unsigned char*, int, int)':
ffmpeg_video_source.cpp:(.text._ZN24OutputMediaStream_FFMPEG5writeEPhii+0x0): multiple definition ofOutputMediaStream_FFMPEG::write(unsigned char, of `OutputMediaStream_FFMPEG::write(unsigned char*, int, int)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN24OutputMediaStream_FFMPEG5writeEPhii+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function create_OutputMediaStream_FFMPEG':
`create_OutputMediaStream_FFMPEG':
ffmpeg_video_source.cpp:(.text.create_OutputMediaStream_FFMPEG+0x0): multiple definition ofcreate_OutputMediaStream_FFMPEG'
of `create_OutputMediaStream_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.create_OutputMediaStream_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function release_OutputMediaStream_FFMPEG':
`release_OutputMediaStream_FFMPEG':
ffmpeg_video_source.cpp:(.text.release_OutputMediaStream_FFMPEG+0x0): multiple definition ofrelease_OutputMediaStream_FFMPEG'
of `release_OutputMediaStream_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.release_OutputMediaStream_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function write_OutputMediaStream_FFMPEG':
`write_OutputMediaStream_FFMPEG':
ffmpeg_video_source.cpp:(.text.write_OutputMediaStream_FFMPEG+0x0): multiple definition ofwrite_OutputMediaStream_FFMPEG'
of `write_OutputMediaStream_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.write_OutputMediaStream_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function InputMediaStream_FFMPEG::open(char `InputMediaStream_FFMPEG::open(char const*, int*, int*, int*, int*)':
ffmpeg_video_source.cpp:(.text._ZN23InputMediaStream_FFMPEG4openEPKcPiS2_S2_S2_+0x0): multiple definition ofInputMediaStream_FFMPEG::open(char const, int, int, int, int)'
of `InputMediaStream_FFMPEG::open(char const*, int*, int*, int*, int*)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN23InputMediaStream_FFMPEG4openEPKcPiS2_S2_S2_+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function InputMediaStream_FFMPEG::close()':
`InputMediaStream_FFMPEG::close()':
ffmpeg_video_source.cpp:(.text._ZN23InputMediaStream_FFMPEG5closeEv+0x0): multiple definition ofInputMediaStream_FFMPEG::close()'
of `InputMediaStream_FFMPEG::close()'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN23InputMediaStream_FFMPEG5closeEv+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function release_InputMediaStream_FFMPEG':
`release_InputMediaStream_FFMPEG':
ffmpeg_video_source.cpp:(.text.release_InputMediaStream_FFMPEG+0x0): multiple definition ofrelease_InputMediaStream_FFMPEG'
of `release_InputMediaStream_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.release_InputMediaStream_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function create_InputMediaStream_FFMPEG':
`create_InputMediaStream_FFMPEG':
ffmpeg_video_source.cpp:(.text.create_InputMediaStream_FFMPEG+0x0): multiple definition ofcreate_InputMediaStream_FFMPEG'
of `create_InputMediaStream_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.create_InputMediaStream_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function InputMediaStream_FFMPEG::read(unsigned `InputMediaStream_FFMPEG::read(unsigned char**, int*, int*)':
ffmpeg_video_source.cpp:(.text._ZN23InputMediaStream_FFMPEG4readEPPhPiS2_+0x0): multiple definition ofInputMediaStream_FFMPEG::read(unsigned char, int, int)'
of `InputMediaStream_FFMPEG::read(unsigned char**, int*, int*)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN23InputMediaStream_FFMPEG4readEPPhPiS2_+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function read_InputMediaStream_FFMPEG':
`read_InputMediaStream_FFMPEG':
ffmpeg_video_source.cpp:(.text.read_InputMediaStream_FFMPEG+0x0): multiple definition ofread_InputMediaStream_FFMPEG'
of `read_InputMediaStream_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.read_InputMediaStream_FFMPEG+0x0): first defined here
collect2: ld returns 1
make[2]:  *** [bin/opencv_perf_gpu] error 1
make[1]:  *** [modules/gpu/CMakeFiles/opencv_perf_gpu.dir/all] errors 2
make: ** *** [all] errors 2

2

So how to solve this?

click to hide/show revision 4
No.4 Revision

OpenCV2.4.3 OpenCV 2.4.3 ffmpeg multiple definitiondefinition [static build]

I'm building OpenCV 2.4.3 on ubuntu 12.04, it stops here.

Linking CXX executable ../../bin/opencv_perf_gpu
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `CvCapture_FFMPEG::init()':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG4initEv+0x0): multiple definition of `CvCapture_FFMPEG::init()'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4initEv+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `CvCapture_FFMPEG::close()':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG5closeEv+0x0): multiple definition of `CvCapture_FFMPEG::close()'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG5closeEv+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `CvCapture_FFMPEG::open(char const*)':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKc+0x0): multiple definition of `CvCapture_FFMPEG::open(char const*)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKc+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `CvCapture_FFMPEG::retrieveFrame(int, unsigned char**, int*, int*, int*, int*)':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG13retrieveFrameEiPPhPiS2_S2_S2_+0x0): multiple definition of `CvCapture_FFMPEG::retrieveFrame(int, unsigned char**, int*, int*, int*, int*)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG13retrieveFrameEiPPhPiS2_S2_S2_+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `CvCapture_FFMPEG::r2d(AVRational)':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG3r2dE10AVRational+0x0): multiple definition of `CvCapture_FFMPEG::r2d(AVRational)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG3r2dE10AVRational+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `CvCapture_FFMPEG::get_duration_sec()':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG16get_duration_secEv+0x0): multiple definition of `CvCapture_FFMPEG::get_duration_sec()'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG16get_duration_secEv+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `CvCapture_FFMPEG::get_bitrate()':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG11get_bitrateEv+0x0): multiple definition of `CvCapture_FFMPEG::get_bitrate()'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG11get_bitrateEv+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `CvCapture_FFMPEG::get_fps()':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG7get_fpsEv+0x0): multiple definition of `CvCapture_FFMPEG::get_fps()'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG7get_fpsEv+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `CvCapture_FFMPEG::get_total_frames()':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG16get_total_framesEv+0x0): multiple definition of `CvCapture_FFMPEG::get_total_frames()'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG16get_total_framesEv+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `CvCapture_FFMPEG::getProperty(int)':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG11getPropertyEi+0x0): multiple definition of `CvCapture_FFMPEG::getProperty(int)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG11getPropertyEi+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `CvCapture_FFMPEG::dts_to_sec(long long)':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG10dts_to_secEx+0x0): multiple definition of `CvCapture_FFMPEG::dts_to_sec(long long)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG10dts_to_secEx+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `CvCapture_FFMPEG::dts_to_frame_number(long long)':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG19dts_to_frame_numberEx+0x0): multiple definition of `CvCapture_FFMPEG::dts_to_frame_number(long long)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG19dts_to_frame_numberEx+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `CvCapture_FFMPEG::grabFrame()':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG9grabFrameEv+0x0): multiple definition of `CvCapture_FFMPEG::grabFrame()'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG9grabFrameEv+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `CvCapture_FFMPEG::seek(long long)':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG4seekEx+0x0): multiple definition of `CvCapture_FFMPEG::seek(long long)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4seekEx+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `CvCapture_FFMPEG::seek(double)':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG4seekEd+0x0): multiple definition of `CvCapture_FFMPEG::seek(double)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4seekEd+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `CvCapture_FFMPEG::setProperty(int, double)':
ffmpeg_video_source.cpp:(.text._ZN16CvCapture_FFMPEG11setPropertyEid+0x0): multiple definition of `CvCapture_FFMPEG::setProperty(int, double)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG11setPropertyEid+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `CvVideoWriter_FFMPEG::init()':
ffmpeg_video_source.cpp:(.text._ZN20CvVideoWriter_FFMPEG4initEv+0x0): multiple definition of `CvVideoWriter_FFMPEG::init()'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4initEv+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `CvVideoWriter_FFMPEG::writeFrame(unsigned char const*, int, int, int, int, int)':
ffmpeg_video_source.cpp:(.text._ZN20CvVideoWriter_FFMPEG10writeFrameEPKhiiiii+0x0): multiple definition of `CvVideoWriter_FFMPEG::writeFrame(unsigned char const*, int, int, int, int, int)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG10writeFrameEPKhiiiii+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `CvVideoWriter_FFMPEG::close()':
ffmpeg_video_source.cpp:(.text._ZN20CvVideoWriter_FFMPEG5closeEv+0x0): multiple definition of `CvVideoWriter_FFMPEG::close()'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG5closeEv+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `CvVideoWriter_FFMPEG::open(char const*, int, double, int, int, bool)':
ffmpeg_video_source.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiib+0x0): multiple definition of `CvVideoWriter_FFMPEG::open(char const*, int, double, int, int, bool)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiib+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `cvCreateFileCapture_FFMPEG':
ffmpeg_video_source.cpp:(.text.cvCreateFileCapture_FFMPEG+0x0): multiple definition of `cvCreateFileCapture_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvCreateFileCapture_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `cvReleaseCapture_FFMPEG':
ffmpeg_video_source.cpp:(.text.cvReleaseCapture_FFMPEG+0x0): multiple definition of `cvReleaseCapture_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvReleaseCapture_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `cvSetCaptureProperty_FFMPEG':
ffmpeg_video_source.cpp:(.text.cvSetCaptureProperty_FFMPEG+0x0): multiple definition of `cvSetCaptureProperty_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvSetCaptureProperty_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `cvGetCaptureProperty_FFMPEG':
ffmpeg_video_source.cpp:(.text.cvGetCaptureProperty_FFMPEG+0x0): multiple definition of `cvGetCaptureProperty_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvGetCaptureProperty_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `cvGrabFrame_FFMPEG':
ffmpeg_video_source.cpp:(.text.cvGrabFrame_FFMPEG+0x0): multiple definition of `cvGrabFrame_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvGrabFrame_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `cvRetrieveFrame_FFMPEG':
ffmpeg_video_source.cpp:(.text.cvRetrieveFrame_FFMPEG+0x0): multiple definition of `cvRetrieveFrame_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvRetrieveFrame_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `cvCreateVideoWriter_FFMPEG':
ffmpeg_video_source.cpp:(.text.cvCreateVideoWriter_FFMPEG+0x0): multiple definition of `cvCreateVideoWriter_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvCreateVideoWriter_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `cvReleaseVideoWriter_FFMPEG':
ffmpeg_video_source.cpp:(.text.cvReleaseVideoWriter_FFMPEG+0x0): multiple definition of `cvReleaseVideoWriter_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvReleaseVideoWriter_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `cvWriteFrame_FFMPEG':
ffmpeg_video_source.cpp:(.text.cvWriteFrame_FFMPEG+0x0): multiple definition of `cvWriteFrame_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.cvWriteFrame_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `OutputMediaStream_FFMPEG::close()':
ffmpeg_video_source.cpp:(.text._ZN24OutputMediaStream_FFMPEG5closeEv+0x0): multiple definition of `OutputMediaStream_FFMPEG::close()'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN24OutputMediaStream_FFMPEG5closeEv+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `OutputMediaStream_FFMPEG::addVideoStream(AVFormatContext*, CodecID, int, int, int, double, PixelFormat)':
ffmpeg_video_source.cpp:(.text._ZN24OutputMediaStream_FFMPEG14addVideoStreamEP15AVFormatContext7CodecIDiiid11PixelFormat+0x0): multiple definition of `OutputMediaStream_FFMPEG::addVideoStream(AVFormatContext*, CodecID, int, int, int, double, PixelFormat)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN24OutputMediaStream_FFMPEG14addVideoStreamEP15AVFormatContext7CodecIDiiid11PixelFormat+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `OutputMediaStream_FFMPEG::open(char const*, int, int, double)':
ffmpeg_video_source.cpp:(.text._ZN24OutputMediaStream_FFMPEG4openEPKciid+0x0): multiple definition of `OutputMediaStream_FFMPEG::open(char const*, int, int, double)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN24OutputMediaStream_FFMPEG4openEPKciid+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `OutputMediaStream_FFMPEG::write(unsigned char*, int, int)':
ffmpeg_video_source.cpp:(.text._ZN24OutputMediaStream_FFMPEG5writeEPhii+0x0): multiple definition of `OutputMediaStream_FFMPEG::write(unsigned char*, int, int)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN24OutputMediaStream_FFMPEG5writeEPhii+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `create_OutputMediaStream_FFMPEG':
ffmpeg_video_source.cpp:(.text.create_OutputMediaStream_FFMPEG+0x0): multiple definition of `create_OutputMediaStream_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.create_OutputMediaStream_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `release_OutputMediaStream_FFMPEG':
ffmpeg_video_source.cpp:(.text.release_OutputMediaStream_FFMPEG+0x0): multiple definition of `release_OutputMediaStream_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.release_OutputMediaStream_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `write_OutputMediaStream_FFMPEG':
ffmpeg_video_source.cpp:(.text.write_OutputMediaStream_FFMPEG+0x0): multiple definition of `write_OutputMediaStream_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.write_OutputMediaStream_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `InputMediaStream_FFMPEG::open(char const*, int*, int*, int*, int*)':
ffmpeg_video_source.cpp:(.text._ZN23InputMediaStream_FFMPEG4openEPKcPiS2_S2_S2_+0x0): multiple definition of `InputMediaStream_FFMPEG::open(char const*, int*, int*, int*, int*)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN23InputMediaStream_FFMPEG4openEPKcPiS2_S2_S2_+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `InputMediaStream_FFMPEG::close()':
ffmpeg_video_source.cpp:(.text._ZN23InputMediaStream_FFMPEG5closeEv+0x0): multiple definition of `InputMediaStream_FFMPEG::close()'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN23InputMediaStream_FFMPEG5closeEv+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `release_InputMediaStream_FFMPEG':
ffmpeg_video_source.cpp:(.text.release_InputMediaStream_FFMPEG+0x0): multiple definition of `release_InputMediaStream_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.release_InputMediaStream_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `create_InputMediaStream_FFMPEG':
ffmpeg_video_source.cpp:(.text.create_InputMediaStream_FFMPEG+0x0): multiple definition of `create_InputMediaStream_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.create_InputMediaStream_FFMPEG+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `InputMediaStream_FFMPEG::read(unsigned char**, int*, int*)':
ffmpeg_video_source.cpp:(.text._ZN23InputMediaStream_FFMPEG4readEPPhPiS2_+0x0): multiple definition of `InputMediaStream_FFMPEG::read(unsigned char**, int*, int*)'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text._ZN23InputMediaStream_FFMPEG4readEPPhPiS2_+0x0): first defined here
../../lib/libopencv_gpu.a(ffmpeg_video_source.cpp.o): In function `read_InputMediaStream_FFMPEG':
ffmpeg_video_source.cpp:(.text.read_InputMediaStream_FFMPEG+0x0): multiple definition of `read_InputMediaStream_FFMPEG'
../../lib/libopencv_highgui.a(cap_ffmpeg.cpp.o):cap_ffmpeg.cpp:(.text.read_InputMediaStream_FFMPEG+0x0): first defined here
collect2: ld returns 1
make[2]: *** [bin/opencv_perf_gpu] error 1
make[1]: *** [modules/gpu/CMakeFiles/opencv_perf_gpu.dir/all] errors 2
make: *** [all] errors 2

So how to solve this?