Libtorch C++ windows 10 CMake

Hi,
I’am trying to build Libtorch C++ example-app in windows 10 with Cuda 9.0 but I have the following error in cMake :

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
torch;caffe2_library;caffe2_gpu_library;C10_LIBRARY-NOTFOUND;C:/Program Files/NVIDIA Corporation/NvToolsExt/lib/x64/nvToolsExt64_1.lib;C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.0/lib/x64/cudart.lib;C10_CUDA_LIBRARY
linked by target “example-app” in directory D:/testlibtorch/example-app

Did anyone solve this problem?
Thank you,

Please tell me more
you see first here https://pytorch.org/cppdocs/installing.html#minimal-example

Hi,

Yes I see https://pytorch.org/cppdocs/installing.html#minimal-example

I am on windows 10 and I have Visual Studio 2015 with cMake 3.16.1
I download libtorch for cuda 9.0.
First I had a problem with c10 but I link c10_LIBRARY to libtorch/lib
Now, in cmake I have configure done and generate done.
But when I open on VS esample-app.sln and I build the project I have a link error : impossible to open ‘…\libtorch\share\cmake\Torch.obj’
Effectively, the file doesn’t exist.

Thank you.

I think your compiler version is too low , Check your system
On Windows
At least Visual Studio 2017 Update 3 (version 15.3.3 with the toolset 14.11) are needed.
you see here https://github.com/pytorch/pytorch/blob/master/README.md