renatoGarcia/opencv-swig

Unable to proceed with Hello World example

Closed this issue · 1 comments

Hello, I've followed the hello world example until this point:

mkdir build
cd build
cmake .. -DOpenCV-SWIG_ROOT="/install"
make

And then I was faced with the following error:

-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19043.
CMake Error at CMakeLists.txt:46 (install):
install DIRECTORY given no DESTINATION!
-- Configuring incomplete, errors occurred!
See also "D:/Yousef/Test/opencv-swig-1.0.1/build/CMakeFiles/CMakeOutput.log".

The mentioned log file contains the following:

The system is: Windows - 10.0.19043 - AMD64

How can I get past this error, thank you

Hello @Yousef-Hesham.
There was a bug when installing on Windows. The last commit have fixed that.
Besides that, by you error message, it looks like you are running that command on the "opencv-swig" project root. That command must be ran on a "build" directory, right under you "hello world" project root. That after installing the lib as explained here.
Pay attention too to what will be the target builder that CMake will generate the project.

As an example to use the "NMake" target on Windows, inside a visual studio cmd instance.

Install with:

cmake .. -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX="C:/opencv-swig"
nmake

Compile the "Hello World":

cmake .. -G "NMake Makefiles" -DOpenCV-SWIG_ROOT="C:/opencv-swig"
nmake