Ask Your Question

vics's profile - activity

2017-02-10 01:44:54 -0600 asked a question qt 5.7, opencv 3.1 and win 10

hi

using MinGW and Cmake I built opencv (with Qt option) and now trying ro run sample program.

Here is the code

#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>

int main()
{
    cv::Mat image= cv::imread("C:\\Work\\QT\\test_project\\1.jpg");
        cv::namedWindow("My Image");
        cv::imshow("My Image", image);
        cv::waitKey(50000);
        return 1;
}

PRO FILE

QT       += core
QT       -= gui
TARGET = test_project
CONFIG   += console
CONFIG   -= app_bundle
TEMPLATE = app
SOURCES += main.cpp

INCLUDEPATH += "C:\Work\Libs\output\openCV\release\include" \
                   "C:\Work\Libs\output\openCV\release\include/opencv" \
                   "C:\Work\Libs\output\openCV\release\include/opencv2"

LIBS += -LC:\Work\Libs\output\openCV\release\x86\mingw\lib \
    -llibopencv_imgcodecs310.dll.a \
    -lopencv_core310.dll.a \
    -lopencv_highgui310.dll.a \
    -lopencv_imgproc310.dll.a \
    -lopencv_features2d310.dll.a \
    -lopencv_calib3d310.dll.a \

i've got 6 errors, like that : cannot find -lopencv_imgcodecs310.dll.a and others libs. All files are situate in

C:\Work\Libs\output\openCV\release\x86\mingw\lib

10.02.2017  10:14    <DIR>          .
10.02.2017  10:14    <DIR>          ..
10.02.2017  10:14                 0 1.txt
09.02.2017  16:07           487 256 libopencv_calib3d310.dll.a
09.02.2017  15:44         1 562 944 libopencv_core310.dll.a
09.02.2017  16:05           521 730 libopencv_features2d310.dll.a
09.02.2017  15:53           380 780 libopencv_flann310.dll.a
09.02.2017  15:49           410 224 libopencv_highgui310.dll.a
09.02.2017  15:48           361 288 libopencv_imgcodecs310.dll.a
09.02.2017  15:47           579 740 libopencv_imgproc310.dll.a
09.02.2017  15:58           388 912 libopencv_ml310.dll.a
09.02.2017  16:02           419 682 libopencv_objdetect310.dll.a
09.02.2017  15:59           462 138 libopencv_photo310.dll.a
09.02.2017  16:01           374 498 libopencv_shape310.dll.a
09.02.2017  16:09           805 528 libopencv_stitching310.dll.a
09.02.2017  16:03           478 608 libopencv_superres310.dll.a
09.02.2017  16:00           375 726 libopencv_video310.dll.a
09.02.2017  15:49           390 076 libopencv_videoio310.dll.a
09.02.2017  16:10           643 104 libopencv_videostab310.dll.a
09.02.2017  15:25            16 517 OpenCVConfig.cmake
09.02.2017  15:38            12 525 OpenCVModules-release.cmake
09.02.2017  15:30             4 763 OpenCVModules.cmake

The my Path system variable holds the following

;C:\MinGW\bin;C:\Work\Libs\output\zlib\lib;C:\Work\Libs\output\jpeg\lib;C:\Work\Libs\output\geotiff\lib;C:\Work\Libs\output\proj\lib;C:\Work\Libs\output\tiff\lib;C:\Work\Libs\output\gdal\lib;C:\Qt\Qt5.7.1\Tools\QtCreator\bin;C:\Work\Libs\output\openCV\release\x86\mingw\lib;

how to fix that ?

Thanks at advance

2016-12-22 12:53:48 -0600 asked a question Qt with OpenCV

I built OpenCV (3.1) by mingw32 with option with Qt 5.7 (set that in CMake utility). My OS is Windows 7 x64

Now i want to test it. I use the sample OpenCV program. I did it in Qt Creator. If the program running in Qt - It's working OK.

But if I run program without QTCreator - appearing the error

Entry point into procedure _Z21qRegisterResourceDataiPKhS0_S0 not find in library DLL Qt5Core.dll

Here is the PATH system variables

C:\Qt\Qt5.7.1\Tools\mingw530_32\bin; C:\Qt\Qt5.7.1\5.7\mingw53_32\bin; E:\opencv\release\x86\mingw\bin; E:\opencv\release\x86\mingw\lib;

I copied Qt5Core.dll from C:\Qt\Qt5.7.1\5.7\mingw53_32\bin to my project folder. If I do that i've another error

The procedure entry point ?left@QString@@QBE>AV1@H@Z could't be found in library DLL Qt5Core.dll

What's wrong ?

Thanks at advance