Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qtcreator under Wine ( MinGw compilant ) error report
Forum Updated to NodeBB v4.3 + New Features

Qtcreator under Wine ( MinGw compilant ) error report

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 746 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    heatblazer
    wrote on last edited by
    #1

    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_bundle

    TEMPLATE = 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@

    1 Reply Last reply
    0
    • JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      Hi,

      Using Wine adds extra complexity.

      What happens if you develop directly in Windows? Or if you download the Linux libraries?

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      0
      • H Offline
        H Offline
        heatblazer
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved