[solved] vs2010, opencv and qt



  • #include <opencv2\opencv.hpp>
    ...
    using namespace cv;
    ...
    Mat mat;
    ...

    And the source can be build very well without any error, but when I run my application, an error occurs:
    "The application was unable to start correctly (0xc000007b). Click OK to close the application."

    Then I remove line "Mat mat". the program runs very well.

    What is the problem?

    After Googling, it seems that this problem is caused by the 64-bit dll and 32-bit application mismatch.
    The environment is: win7 64-bit, vs2010, opencv x86, qt 4.8.5 32bit.

    Still I can not solve the problem.
    Thanks in advance for any answer.



  • Do you have a qt 4.8.5 64bit version or 32bit?



  • QT 4.8.5 only have 32-bit version. And I am using it.

    [quote author="t3685" date="1380887341"]Do you have a qt 4.8.5 64bit version or 32bit?[/quote]


  • Lifetime Qt Champion

    Hi,

    When running your application, are you sure your PATH contains the folder for the x86 MinGW version of OpenCV ?



  • Ahhh, that's the problem! I forget to change the path of opencv from x64 to x86.
    (I was using x64 opencv before)

    Thank you very much..
    [quote author="SGaist" date="1380901103"]Hi,

    When running your application, are you sure your PATH contains the folder for the x86 MinGW version of OpenCV ?[/quote]


  • Lifetime Qt Champion

    You're welcome !

    Since you got it working now, please update the thread title to solved so other forum users may know a solution has been found :)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.