Rebuilding 'build.ninja': subcommand failed

Viewed 2598

I'm trying to build my CMake project in Visual Studio 2019, but all of a sudden, after using this exact make file and setup for almost two weeks, it throws the error-

rebuilding 'build.ninja': subcommand failed

I didn't even know I was using ninja, didn't know it was installed and I haven't had any problems before. Any help would be appreciated!

1 Answers

It can be CMake cannot link to the include directories and the libraries. You can consider add the prefix path of those files in the CMakeList. For example:

set( OpenCV_DIR "E:/OpenCV/opencv/build" )    
set( OpenCV_INCLUDE_DIR "E:/OpenCV/opencv/build/include" )
Related