I am running opencv and qt.I have successfully added the includes for the opencv.But when I am doing cvLoadImage,there is a linker error.
This is my code:
void MainWindow:n_pushButton_clicked()
{
img = cvLoadImage("C:\\Users\\MLS-PROGRAMER\\Documents\\Visual Studio 2010\\Projects\\Image_processing\\Image_processing \\thres.png");
// cvNamedWindow("Image",CV_WINDOW_AUTOSIZE);
// cvShowImage("Image", img);
// cvWaitKey(40);
}
This is the error message:
mainwindow.obj:-1: error: LNK2019: unresolved external symbol _cvLoadImage referenced in function "private: void __thiscall MainWindow:n_pushButton_clicked(void)" (?on_pushButton_clicked@MainWindow@@AAEXXZ)
debug\FIDAS.exe:-1: error: LNK1120: 1 unresolved externals
My project file is like this
#-------------------------------------------------
#
# Project created by QtCreator 2012-05-29T10:31:40
#
#-------------------------------------------------
QT += core gui
TARGET = FIDAS
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
INCLUDEPATH += C:\OpenCV2.3\opencv\build\include\opencv2\core \
C:\OpenCV2.3\opencv\build\include\opencv \
C:\OpenCV2.3\opencv\build\include\opencv2\imgproc \
C:\OpenCV2.3\opencv\build\gpu\x64\lib \
CONFIG(release,debug|release)
{
LIBS += C:\OpenCV2.3\opencv\build\gpu\x64\lib\opencv_calib 3d231.lib \
C:\OpenCV2.3\opencv\build\gpu\x64\lib\opencv_contr ib231.lib \
C:\OpenCV2.3\opencv\build\gpu\x64\lib\opencv_core2 31.lib \
C:\OpenCV2.3\opencv\build\gpu\x64\lib\opencv_featu res2d231.lib \
C:\OpenCV2.3\opencv\build\gpu\x64\lib\opencv_flann 231.lib \
C:\OpenCV2.3\opencv\build\gpu\x64\lib\opencv_gpu23 1.lib \
C:\OpenCV2.3\opencv\build\gpu\x64\lib\opencv_haart raining_engine.lib \
C:\OpenCV2.3\opencv\build\gpu\x64\lib\opencv_highg ui231.lib \
C:\OpenCV2.3\opencv\build\gpu\x64\lib\opencv_imgpr oc231.lib \
C:\OpenCV2.3\opencv\build\gpu\x64\lib\opencv_legac y231.lib \
C:\OpenCV2.3\opencv\build\gpu\x64\lib\opencv_ml231 .lib \
C:\OpenCV2.3\opencv\build\gpu\x64\lib\opencv_objde tect231.lib \
C:\OpenCV2.3\opencv\build\gpu\x64\lib\opencv_ts231 .lib \
C:\OpenCV2.3\opencv\build\gpu\x64\lib\opencv_video 231.lib \
}
CONFIG(debug,debug|release)
{
LIBS += C:\OpenCV2.3\opencv\build\gpu\x64\lib\opencv_calib 3d231d.lib \
C:\OpenCV2.3\opencv\build\gpu\x64\lib\opencv_contr ib231d.lib \
C:\OpenCV2.3\opencv\build\gpu\x64\lib\opencv_core2 31d.lib \
C:\OpenCV2.3\opencv\build\gpu\x64\lib\opencv_featu res2d231d.lib \
C:\OpenCV2.3\opencv\build\gpu\x64\lib\opencv_flann 231d.lib \
C:\OpenCV2.3\opencv\build\gpu\x64\lib\opencv_gpu23 1d.lib \
C:\OpenCV2.3\opencv\build\gpu\x64\lib\opencv_haart raining_engined.lib \
C:\OpenCV2.3\opencv\build\gpu\x64\lib\opencv_highg ui231d.lib \
C:\OpenCV2.3\opencv\build\gpu\x64\lib\opencv_imgpr oc231d.lib \
C:\OpenCV2.3\opencv\build\gpu\x64\lib\opencv_legac y231d.lib \
C:\OpenCV2.3\opencv\build\gpu\x64\lib\opencv_ml231 d.lib \
C:\OpenCV2.3\opencv\build\gpu\x64\lib\opencv_objde tect231d.lib \
C:\OpenCV2.3\opencv\build\gpu\x64\lib\opencv_ts231 d.lib \
C:\OpenCV2.3\opencv\build\gpu\x64\lib\opencv_video 231d.lib \
}
Any help for this issues would be great.?
Bookmarks