title: Undefined Variable in Qt Creator C++ using OpenCV
body: <p>I'm facing problem in my qt creator, here is the issue that shown by Qt Creator:</p>
  
  <blockquote>
    <p>D:\Kuliah\Semester 5\IF431316 PECI\Qt Project File\Sobel\main.cpp:39: error: undefined reference to <code>cv::imread(cv::String const&amp;, int)</code><br>
    D:\Kuliah\Semester 5\IF431316 PECI\Qt Project File\Sobel\main.cpp:60: error: undefined reference to <code>cv::namedWindow(cv::String const&amp;, int)</code><br>
    D:\Kuliah\Semester 5\IF431316 PECI\Qt Project File\Sobel\main.cpp:61: error: undefined reference to <code>cv::imshow(cv::String const&amp;, cv::_InputArray const&amp;)</code><br>
        D:\Kuliah\Semester 5\IF431316 PECI\Qt Project File\Sobel\main.cpp:64: error: undefined reference to <code>cv::namedWindow(cv::String const&amp;, int)</code><br>
        D:\Kuliah\Semester 5\IF431316 PECI\Qt Project File\Sobel\main.cpp:65: error: undefined reference to <code>cv::imshow(cv::String const&amp;, cv::_InputArray const&amp;)</code><br>
        D:\Kuliah\Semester 5\IF431316 PECI\Qt Project File\build-Sobel-Desktop-Debug\debug\main.o:-1: In function `ZN2cv6StringC1EPKc':
        collect2.exe:-1: error: error: ld returned 1 exit status</p>
  </blockquote>
  
  <p>This is my <code>.pro</code> file that contain library, I've trying add some libraries as suggested by many members, but nothing happen at all, it's getting worse</p>
  
  <pre><code>TEMPLATE = app
  CONFIG += console c++11
  CONFIG -= app_bundle
  CONFIG -= qt
  
  SOURCES += main.cpp
  
  INCLUDEPATH += C:\\opencv\\build\\include \
  INCLUDEPATH += C:\\opencv\\sources\\include \
  
  LIBS += -LC:\\opencv\\sources\Built_with_Qt\\debug\\lib \
    -lopencv_calib3d231d \
    -lopencv_contrib231d \
    -lopencv_core231d \
    -lopencv_features2d231d \
    -lopencv_flann231d \
    -lopencv_gpu231d \
    -lopencv_highgui231d \
    -lopencv_imgproc231d \
    -lopencv_legacy231d \
    -lopencv_ml231d \
    -lopencv_objdetect231d \
    -lopencv_ts231d \
    -lopencv_video231d
  </code></pre>