Q1.Does
“Set the cmake variable CMAKE_PREFIX_PATH to the OpenCV library folder
(e.g. C:\Users\user.name\opencv\build)”
in the C:\Program Files\Ensenso\development\examples\C++\nxView\Readme.txt
file mean to set it as shown in the image below?
Q2.When I ran the build with the above settings,
a dialog box was displayed saying that the DLL could not be found.
I was able to run the program by copying opencv_world4110d.dll to \Ensenso\development\examples\C++\nxView\out\build\x64-Debug\bin\Debug
Did I make a mistake in the settings?
I do not quite understand the paths in your screenshot, so let me try to tell you what I did to reproduce your problem:
I downloaded the Windows installer for OpenCV 4.10.0.
I unpacked OpenCV directly into the Download folder.
I opened the NxView project file with Visual Studio 2022.
I added -DCMAKE_PREFIX_PATH=C:\Users\raphael\Downloads\opencv\build to the CMake command arguments.
After that I was able to compile and run NxView without it complaining about a missing OpenCV DLL. CMake had copied opencv_world4100d.dll to the right location, which in my case was C:\Program Files\Ensenso\development\examples\C++\nxView\out\build\x64-Debug\bin, right next to NxView.exe.
Having typed all that I just noticed that my DLL is called opencv_world4100d.dll, which would be consistent with your mention of OpenCV 4.10.0, while further down you refer to opencv_world4110d.dll. We also seem to require the DLL in different locations, or is your NxView.exe also located in \Ensenso\development\examples\C++\nxView\out\build\x64-Debug\bin\Debug?
I am not sure how to proceed. Maybe we can try to clarify the discrepancies and you could try again?
Thank you for your reply.
Sorry. I wrote the wrong version of OpenCV.(4.11.0)
The steps I took, including paths, are as follows:
I am experimenting by copying the development folder from
when the SDK was installed to C:\hoge
and renaming it to “development-SDKv411023”. C:\hoge\development-SDKv411023\examples
Download opencv-4.11.0-windows.exe and run it to generate the “opencv” folder
which will be placed in C:\opencv.
In VS2022, select Open Local Folder C:\hoge\development-SDKv411023\examples\C++\nxView
In VS2022, select Project-CMake Settings for NxViewExample from the menu.
Add -DCMAKE_PREFIX_PATH=C:/opencv/build
to the CMake command arguments.
In VS2022, select Build-Build ALL from the menu.
NxView.exe will be generated in C:\hoge\development-SDKv411023\examples\C++\nxView\out\build\x64-Debug\bin\Debug
and the plugins folder and the following DLLs will be copied to C:\hoge\development-SDKv411023\examples\C++\nxView\out\build\x64-Debug\bin
opencv_world4110d.dll
Qt5Concurrentd.dll
Qt5Cored.dll
Qt5Networkd.dll
Qt5Widgetsd.dll
When you select Debug-Start Debugging from the menu in VS2022, a dialog box appears stating that opencv_world4110d.dll cannot be found.
If I run opencv_world4110d.dll in C:\hoge\development-SDKv411023\examples\C++\nxView\out\build\x64-Debug\bin\Debug, it will run without any problems.
Are there any steps that might be causing problems?
Thank you in advance.
K.N.