Solved lnk2019 with opencv treshold
-
You are missing the "-l" in your LIBS lines.
-
hum, but they are presents in makefile.debug
i also try again this notation but still the same problem
LIBS += -L"C:/src/vcpkg/vcpkg/packages/opencv4_x64-windows/lib" -lopencv_calib3d LIBS += -L"C:/src/vcpkg/vcpkg/packages/opencv4_x64-windows/lib" -lopencv_core LIBS += -L"C:/src/vcpkg/vcpkg/packages/opencv4_x64-windows/lib" -lopencv_dnn LIBS += -L"C:/src/vcpkg/vcpkg/packages/opencv4_x64-windows/lib" -lopencv_features2d LIBS += -L"C:/src/vcpkg/vcpkg/packages/opencv4_x64-windows/lib" -lopencv_flann LIBS += -L"C:/src/vcpkg/vcpkg/packages/opencv4_x64-windows/lib" -lopencv_highgui LIBS += -L"C:/src/vcpkg/vcpkg/packages/opencv4_x64-windows/lib" -lopencv_imgcodecs LIBS += -L"C:/src/vcpkg/vcpkg/packages/opencv4_x64-windows/lib" -lopencv_imgproc LIBS += -L"C:/src/vcpkg/vcpkg/packages/opencv4_x64-windows/lib" -lopencv_ml LIBS += -L"C:/src/vcpkg/vcpkg/packages/opencv4_x64-windows/lib" -lopencv_objdetect LIBS += -L"C:/src/vcpkg/vcpkg/packages/opencv4_x64-windows/lib" -lopencv_photo LIBS += -L"C:/src/vcpkg/vcpkg/packages/opencv4_x64-windows/lib" -lopencv_stitching LIBS += -L"C:/src/vcpkg/vcpkg/packages/opencv4_x64-windows/lib" -lopencv_video LIBS += -L"C:/src/vcpkg/vcpkg/packages/opencv4_x64-windows/lib" -lopencv_videoio
-
So if you build in debug mode it works ?
-
no... i dont know why but i feel if we find the problem that will be something really stupid. and if not i will just try to compile by hand opencv but that should work like that
-
Are these static or dynamic librairies ?
In any case, what I would do is simplify things with the LIBS part to only link to opencv_core and only use symbols from that library in the sample application.
This will restrict the scope of the issue.
-
i just checked it with lib.exe and libs file containes dll. its dynamics library
-
ok so i compile by hand opencv following this step: https://wiki.qt.io/How_to_setup_Qt_and_openCV_on_Windows_with_MSVC2017#Building_OpenCV
the two difference is i use msvc 2019 and opencv 4.5.1.
compilation seems to be a succes but when i try to us it in qt the application crash without any information
-
If there's a crash then it likely is that the dlls are not found at run time. Go to the Run part of the Project panel and update the PATH environment variable there so that the folder containing the OpenCV dlls are found.
-
Ok my bad. i already added to path but i didnt restart my computer. i just restart it and that work well.
result: no more problem and treshold function work. thank you so much for your time!
-
Then you did it in the wrong place. Do not alter your machine's PATH, do it in Qt Creator as I explained above.