Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. C++ Gurus
  4. Cannot mix incompatible Qt library (version 0x40805) with this library (version 0x40804)
Forum Updated to NodeBB v4.3 + New Features

Cannot mix incompatible Qt library (version 0x40805) with this library (version 0x40804)

Scheduled Pinned Locked Moved C++ Gurus
4 Posts 2 Posters 5.9k 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.
  • R Offline
    R Offline
    Reena23
    wrote on last edited by
    #1

    Hi i have configured Qt for Visual Studio 2008 based on the instructions in http://docs.opencv.org/2.4.4/doc/tutorials/introduction/windows_install/windows_install.html#installation-by-making-your-own-libraries-from-the-source-files
    i got the opengl support but when i try to run the following command
    #include "stdafx.h"
    int tmain(int argc, _TCHAR* argv[])
    {
    return 0;
    }
    #include
    #include
    #include <opencv2/core/openglinterop.hpp>
    #include
    #include "E:\OpenCV\Build\cvconfig.h"
    #ifndef HAVE_OPENGL
    int main()
    {
    std::cerr << "Library was built without OpenGL support" << std::endl;
    return -1;
    }
    #else

    #ifdef WIN32
    #define WIN32_LEAN_AND_MEAN 1
    #define NOMINMAX 1
    #include
    #endif

    #if defined(APPLE)
    #include
    #include
    #else
    #include
    #include
    #endif

    using namespace cv;
    using namespace std;
    void on_opengl(void* userdata);

    int main(void)
    {
    VideoCapture webcam(CV_CAP_ANY);

    namedWindow("window", CV_WINDOW_OPENGL);

    Mat frame;
    ogl::Texture2D tex;

    setOpenGlDrawCallback("window", on_opengl, &tex);

    while(waitKey(30) < 0)
    {
    webcam >> frame;
    tex.copyFrom(frame);
    updateWindow("window");
    }

    setOpenGlDrawCallback("window", 0, 0);
    destroyAllWindows();

    return 0;
    }

    void on_opengl(void* userdata)
    {
    ogl::Texture2D* pTex = static_castogl::Texture2D*(userdata);
    if (pTex->empty())
    return;

    glLoadIdentity();

    glTranslated(0.0, 0.0, 1.0);

    glRotatef( 55, 1, 0, 0 );
    glRotatef( 45, 0, 1, 0 );
    glRotatef( 0, 0, 0, 1 );

    static const int coords[6][4][3] = {
    { { +1, -1, -1 }, { -1, -1, -1 }, { -1, +1, -1 }, { +1, +1, -1 } },
    { { +1, +1, -1 }, { -1, +1, -1 }, { -1, +1, +1 }, { +1, +1, +1 } },
    { { +1, -1, +1 }, { +1, -1, -1 }, { +1, +1, -1 }, { +1, +1, +1 } },
    { { -1, -1, -1 }, { -1, -1, +1 }, { -1, +1, +1 }, { -1, +1, -1 } },
    { { +1, -1, +1 }, { -1, -1, +1 }, { -1, -1, -1 }, { +1, -1, -1 } },
    { { -1, -1, +1 }, { +1, -1, +1 }, { +1, +1, +1 }, { -1, +1, +1 } }
    };

    glEnable(GL_TEXTURE_2D);
    pTex->bind();

    for (int i = 0; i < 6; ++i) {
    glColor3ub( i20, 100+i10, i42 );
    glBegin(GL_QUADS);
    for (int j = 0; j < 4; ++j) {
    glVertex3d(0.2
    coords[i][j][0], 0.2 * coords[i][j][1], 0.2*coords[i][j][2]);
    }
    glEnd();
    }
    }
    #endif

    I get the message opengl support available but Cannot mix incompatible Qt library (version 0x40805) with this library (version 0x40804)
    it is due to the lines namedWindow("window", CV_WINDOW_OPENGL); and setOpenGlDrawCallback("window", on_opengl, &tex);
    I am working on Windows 7 and have 2 versions of Microsoft SDK
    C:\Program Files\Microsoft SDKs\Windows\v6.0A (old version)
    C:\Program Files\Microsoft SDKs\Windows\v6.1 (new version)
    am not sure which opengl32 and glu32 is considered coz am not sure of the path
    Can someone please help me solve these error
    I downloaded qt-everywhere-opensource-src-4.8.5 from http://qt-project.org/downloads and extracted it in a qt folder .
    Someone please help me with error. Its urgent. Please

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      From the looks of it, you might be using an OpenCV built against Qt 4.8.4 in your Qt 4.8.5 project so basically you have two solution:

      • Build Qt 4.8.4
      • Rebuild OpenCV with Qt 4.8.5

      Hope it helps

      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
      • R Offline
        R Offline
        Reena23
        wrote on last edited by
        #3

        But from where can i get Qt 4.8.4 open source code from. It would be a great help if i could get a download link for Qt 4.8.4 open source code.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          In the archive "here":http://download.qt-project.org/archive/qt/4.8/4.8.4/

          Or using git

          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

          • Login

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