I am trying to compile qgifer-0.2.1-source from its source in Ubuntu. I have all the dependencies installed. I am compiling as per below instruction from README of the source.

cd qgifer_source_dir
mkdir build && cd build
sudo make install

Everything went fine including compilations and obj creation, but when it starts linking, the file frameplayer.cpp failed.

It seems to be a problem with the OpenCV package. I have installed the OpenCV as per instruction.

OpenCV details:

$ pkg-config opencv --libs
-L/usr/local/lib -lopencv_shape -lopencv_stitching -lopencv_objdetect -lopencv_superres -lopencv_videostab -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_video -lopencv_photo -lopencv_ml -lopencv_imgproc -lopencv_flann -lopencv_core -lopencv_hal 

The error file frameplayer.cpp's header contains:


#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>

OpenCV is installed in my system like this:

  1. this contains the cmake config files for OpenCV

  2. the hpp files (core, highgui ..) is present at


These I tried but didn't work

  • reinstall OpenCV

  • configure the source again by changing the header file with full hpp file path and make

Any help would be appreciated.

Error details:

arindam@arindam-sandbox:~/Downloads/qgifer-0.2.1-source/build$ sudo make
[  1%] Generating qrc_res.cxx
[  3%] Generating src/moc_frameplayer.cxx
[  4%] Generating src/moc_previewwidget.cxx
[  6%] Generating src/moc_mainwindow.cxx
[ 96%] Building CXX object CMakeFiles/qgifer.dir/src/moc_interpolationdialog.cxx.o
[ 98%] Building CXX object CMakeFiles/qgifer.dir/src/moc_textobject.cxx.o
[100%] Building CXX object CMakeFiles/qgifer.dir/qrc_res.cxx.o
Linking CXX executable qgifer
CMakeFiles/qgifer.dir/src/frameplayer.cpp.o: In function `FramePlayer::FramePlayer(QWidget*)':
frameplayer.cpp:(.text+0x984): undefined reference to `cv::VideoCapture::VideoCapture()'
frameplayer.cpp:(.text+0xddf): undefined reference to `cv::VideoCapture::~VideoCapture()'
CMakeFiles/qgifer.dir/src/frameplayer.cpp.o: In function `FramePlayer::~FramePlayer()':
frameplayer.cpp:(.text+0xf07): undefined reference to `cv::VideoCapture::~VideoCapture()'
CMakeFiles/qgifer.dir/src/frameplayer.cpp.o: In function `FramePlayer::~FramePlayer()':
frameplayer.cpp:(.text+0xf77): undefined reference to `cv::VideoCapture::~VideoCapture()'
CMakeFiles/qgifer.dir/src/frameplayer.cpp.o: In function `FramePlayer::nextFrame()':
mainwindow.cpp:(.text+0x6f8c): undefined reference to `cv::VideoCapture::isOpened() const'
mainwindow.cpp:(.text+0x7139): undefined reference to `cv::VideoCapture::get(int) const'
collect2: error: ld returned exit 1 status
CMakeFiles/qgifer.dir/build.make:1123: recipe for target 'qgifer' failed
make    [2]: ***     [qgifer] Error 1
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/qgifer.dir/all' failed
make    [1]: ***     [CMakeFiles/qgifer.dir/all] Error 2
Makefile:136: recipe for target 'all' failed
make: ***     [all] Error 2
  • It seems to build fine on Ubuntu 14.04 with the pre-built OpenCV 2.4.8 (libopencv-dev metapackage) from the repository - what version of OpenCV did you install manually (and why)? Dec 12, 2015 at 11:53
  • I have installed OpenCV 3.0.0 because the cmake asked for it. I am in 15.10, OpenCV was not there. I tried deleting every instances of OpenCV and reinstall again but the same error come up. I need to probably go back to 14.04.
    – Arindam
    Dec 12, 2015 at 12:26
  • 2
    Out of curiosity, did you try installing the default libopencv-dev for 15.10 (version 2.4.9) from the repository? Dec 12, 2015 at 12:55
  • 1
    No. I did not use apt for that. I downloaded OpenCV 3.0 from opencv.org/downloads.html and build it from source as well. Too bad. I did not know about libopencv-dev. You know what, I removed 15.10 , and did a fresh install just now. And now installing libopencv-dev. Lets see what happens.
    – Arindam
    Dec 12, 2015 at 13:49


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.