CMAKE issues in creation of DLIB for GPU in Windows

I am trying to install DLIB with GPU support for windows and have been running into errors I can not resolve.

I have visual studio 2022 installed with C++,C++ CMAKE TOOLS for Windows etc. all installed

Below is CMAKE command line I am trying to run.

(tf-gpu) C:\Users\Conda\HelloWorld\Face\dlib\build>cmake -S C:\Users\Conda\HelloWorld\Face\dlib -B C:\Users\Conda\HelloWorld\Face\dlib\build
CMake Error at CMakeLists.txt:3 (project):

‘nmake’ ‘-?’

failed with:

The system cannot find the file specified

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
– Configuring incomplete, errors occurred!
See also “C:/Users/Conda/HelloWorld/Face/dlib/build/CMakeFiles/CMakeOutput.log”.

Please advise.


Which cmake version do you use? The default generator should be Visual Studio, not nmake. But maybe you’re version is too old to detect VS2022.
You can also check where cmake is installed with which cmake. I assume it’s not the one coming with VS itself.
As an alternative: With VS you can simply open a CMake based project and it will automatically set it up.

Thanks for the quick reply. The cmake gui is 3.24-rc5-C This seems to be the current version.

The reference to nmake came in the error message. Where am I referencing this?

Ho should I proceed

More…Where do I run which cmake?

This is what I want to do cmake -D DLIB_USE_CUDA=1 -D USE_AVX_INSTRUCTIONS=1 …/

I am running under anaconda and it has CUDA installed in the local environments. An idea what happen if I install a version outside of conda?

Here is my visual studio installs:

1 Like

hi bill:
have you resolved this issue?
i have this isssue too, if you have solution ,please tell me.
my mail:

by jimmy

Haven’t gotten back to it.