Qtcreator under Wine ( MinGw compilant ) error report
-
Hello, I am trying to test OpenCV with QtCreator, I`ve followed some examples, that supposedly should work, but the console shows me a strange error.
Here is the pro. file:
@TEMPLATE = app
QT += core
QT -= gui
CONFIG += console
CONFIG -= app_bundleTEMPLATE = app
win32 {message("*using settings for windows") INCLUDEPATH += "Z:\\home\\ilian\\OpenCV_WINE\\opencv\\build\\include" \ "Z:\\home\\ilian\\OpenCV_WINE\\opencv\\build\\include\\opencv" \ "Z:\\home\\ilian\\OpenCV_WINE\\opencv\\build\\include\\opencv2" LIBS += -L "Z:\\home\\ilian\\OpenCV_WINE\\opencv\\build\\x86\\mingw\\lib" \ -lopencv_core243 \ -lopencv_highgui243 \ -lopencv_imgproc243
}
SOURCES += main.cpp
@
and the main.c fie:
@#include "opencv2/highgui/highgui.hpp"
#include <QString>
#include <QCoreApplication>
#include <QDebug>using namespace cv;
int main(int argc, char** argv)
{QCoreApplication app(argc, argv); QString vlad ("Z:\\home\\ilian\\vladi.jpg"); Mat im = imread(vlad.toStdString(), 1); qDebug() << vlad; if ( im.empty() ) { return -1; } imshow("image", im); waitKey(0); return app.exec();
}
@The error shown by running (release or debug) is:
@terminate called after throwing an instance of 'std::length_error'
what(): basic_string::assign@ -
Hi,
Using Wine adds extra complexity.
What happens if you develop directly in Windows? Or if you download the Linux libraries?
-
I don`t have windows right now, and for linux I have no problems, I need the windows testings and builds because I am making a camera software under opencv.