Hello everyone,
I will apologize in advance for asking this because I know this is a topic that's been discussed , but unfortunately for me none of the many topics I've searched have helped me.
I am trying to write a simple program using opencv in QT CREATOR(few lines of code involving basic opencv functions), but am receiving errors as such:
" error: undefined reference to `cvNamedWindow' "
here is the pro file
HEADERS = patientdata.h \
recordingSoftwareGui.h \
functions.h \
filemanagement.h \
patienttrial.h \
addtrialdialog.h \
asciiTable.h \
Rectangle.h \
Point.h
SOURCES = main.cpp \
patientdata.cpp \
functions.cpp \
recordingSoftwareGui.cpp \
filemanagement.cpp \
patienttrial.cpp \
addtrialdialog.cpp
FORMS = recordingSoftwareGui.ui \
addtrialdialog.ui
INCLUDEPATH+= D:\OPENCV240MIN2\install\include\
D:\OPENCV240MIN2\install\include\opencv \
D:\OPENCV240MIN2\install\include\opencv2 \
D:\OPENCV240MIN2\install\include\opencv2\calib3d \
D:\OPENCV240MIN2\install\include\opencv2\contrib \
D:\OPENCV240MIN2\install\include\opencv2\core \
D:\OPENCV240MIN2\install\include\opencv2\features2d \
D:\OPENCV240MIN2\install\include\opencv2\flann \
D:\OPENCV240MIN2\install\include\opencv2\gpu \
D:\OPENCV240MIN2\install\include\opencv2\highgui \
D:\OPENCV240MIN2\install\include\opencv2\legacy \
D:\OPENCV240MIN2\install\include\opencv2\ml \
D:\OPENCV240MIN2\install\include\opencv2\nonfree \
D:\OPENCV240MIN2\install\include\opencv2\objdetect \
D:\OPENCV240MIN2\install\include\opencv2\photo \
D:\OPENCV240MIN2\install\include\opencv2\stitching \
D:\OPENCV240MIN2\install\include\opencv2\ts \
D:\OPENCV240MIN2\install\include\opencv2\video \
D:\OPENCV240MIN2\install\include\opencv2\videostab
LIBS+=-L"D:\OPENCV240MIN2\install\lib"
HEADERS = patientdata.h \
recordingSoftwareGui.h \
functions.h \
filemanagement.h \
patienttrial.h \
addtrialdialog.h \
asciiTable.h \
Rectangle.h \
Point.h
SOURCES = main.cpp \
patientdata.cpp \
functions.cpp \
recordingSoftwareGui.cpp \
filemanagement.cpp \
patienttrial.cpp \
addtrialdialog.cpp
FORMS = recordingSoftwareGui.ui \
addtrialdialog.ui
INCLUDEPATH+= D:\OPENCV240MIN2\install\include\
D:\OPENCV240MIN2\install\include\opencv \
D:\OPENCV240MIN2\install\include\opencv2 \
D:\OPENCV240MIN2\install\include\opencv2\calib3d \
D:\OPENCV240MIN2\install\include\opencv2\contrib \
D:\OPENCV240MIN2\install\include\opencv2\core \
D:\OPENCV240MIN2\install\include\opencv2\features2d \
D:\OPENCV240MIN2\install\include\opencv2\flann \
D:\OPENCV240MIN2\install\include\opencv2\gpu \
D:\OPENCV240MIN2\install\include\opencv2\highgui \
D:\OPENCV240MIN2\install\include\opencv2\legacy \
D:\OPENCV240MIN2\install\include\opencv2\ml \
D:\OPENCV240MIN2\install\include\opencv2\nonfree \
D:\OPENCV240MIN2\install\include\opencv2\objdetect \
D:\OPENCV240MIN2\install\include\opencv2\photo \
D:\OPENCV240MIN2\install\include\opencv2\stitching \
D:\OPENCV240MIN2\install\include\opencv2\ts \
D:\OPENCV240MIN2\install\include\opencv2\video \
D:\OPENCV240MIN2\install\include\opencv2\videostab
LIBS+=-L"D:\OPENCV240MIN2\install\lib"
To copy to clipboard, switch view to plain text mode
I have tried 5-6 different versions of opencv- some of which compiled with mingw , some of which precompiled with MSVC.
I have made sure to compile opencv with the same gcc and g++ that QT uses.
Yet I still am not making any progress ; I am using QT version 4.8.0 if that makes any difference.
Any help would be appreciated , thank you.
Bookmarks