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. [Solved] is opencv/Qt installation stable? slash directions make no difference still compiles
Forum Updated to NodeBB v4.3 + New Features

[Solved] is opencv/Qt installation stable? slash directions make no difference still compiles

Scheduled Pinned Locked Moved General and Desktop
opencv qt simpl
3 Posts 2 Posters 800 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.
  • TechnologistT Offline
    TechnologistT Offline
    Technologist
    wrote on last edited by Technologist
    #1

    I installed a simple app 'Lena " Qt/OpenCV and it executes successfully. However it appears that the backslash/forward slash in the includepath is virtually ignored "/", "//", "\" or "\ " in the pro.file. Either way with the slashes, it works. Is this normal behavior? From the evidence can I conclude whether the build is stable or not?

    .PRO file
    
    QT       += core
    
    QT       -= gui
    
    TARGET = Lena
    CONFIG   += console
    CONFIG   -= app_bundle
    
    TEMPLATE = app
    
    INCLUDEPATH += C:/opencv-win/opencv/sources/modules/core/include \
    #INCLUDEPATH += C:\\opencv-win\\opencv\\sources\\modules\\highgui\\include \
    #INCLUDEPATH += C:\\opencv-win\\opencv\\sources\\modules\\imgproc\\include
    #INCLUDEPATH += C://OpenCV2.2//include\
    
    LIBS +=-LC:\\OpenCV-2.3.1\\include
    LIBS +=-LC:\\OpenCV-2.3.1\\bin\
        -lopencv_core2411 -lopencv_highgui2411 -lopencv_imgproc2411 -lopencv_video2411
    
    SOURCES += main.cpp
    
    
    (.pro)
    
    MAIN:
    
    #include "iostream"
    #include <opencv2/core/core.hpp>
    #include <opencv2/highgui/highgui.hpp>
    #include <opencv2/imgproc/imgproc.hpp>
    
    using namespace cv;
    using namespace std;
    
    int main()
    {
        IplImage *image = cvLoadImage("C:\\lena.jpg");
        Mat im(image);
        imshow("TEST",im);
        waitKey();
        return 0;
    }
      ```                                ^
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      When using Qt you can simplify things and just use the Unix forward slash notation even on Windows

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • TechnologistT Offline
        TechnologistT Offline
        Technologist
        wrote on last edited by
        #3

        Thx, problem resolved. Consider it closed.

        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