КОД:
Код: Выделить всё
#include
#include
#include
#include
using namespace cv;
int _tmain(int argc, _TCHAR* argv[])
{
cv::Mat M(7,7,CV_32FC2,Scalar(1,3));
return 0;
}
Код: Выделить всё
.proКод: Выделить всё
QT -= gui
TARGET = testopencv
CONFIG += console
CONFIG -= app_bundle
INCLUDEPATH += C:/OpenCV2_1/include/opencv
TEMPLATE = app
LIBS += C:/OpenCV2_1/lib/cxcore210d.lib \
C:/OpenCV2_1/lib/cv210d.lib \
C:/OpenCV2_1/lib/highgui210d.lib\
C:/OpenCV2_1/lib/cvaux210d.lib
SOURCES += main.cpp
И в файле .pro:
Код: Выделить всё
QMAKE_LIBDIR += C:/OpenCV2_1/lib/Debug
LIBS += -lcxcore210d \
-lcv210d \
-lhighgui210d
Код: Выделить всё
debug/main.o:C:\griskin\test\app\testopencv/../../../../OpenCV2_1/include/opencv/cxcore.hpp:97: undefined reference to cv::format(char const*, ...)'В Visual Studio это работает, но мне нужно, чтобы это работало в QTCreator..
Подробнее здесь: https://stackoverflow.com/questions/273 ... ng-problem
Мобильная версия