'how to solve ' CUDA was found but your compiler failed to compile a simple CUDA program'

I tried vs2015 2017 2019 2022 without success, cmake also tried 3.14.1 and the latest version, cuda is available, and vs2019 seems to have also compiled test.cu and passed, can anyone tell me how to solve the problem of cmake compiling dlib the problem

12



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source