In Windows 10, how to install/include LibTorch in Visual Studio Professional 2015?

Till now, I just downloaded the LibTorch from here https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-latest.zip

I tried to include it to my Visual Studio application project, but I still get errors with “file not found”.

Also, I need to have installed PyTorch 1.0 in Windows ? I downloaded the model.pt from Kaggle Kernels.

I need a complete tutorial with how I install/include LibTorch in Visual Studio.

It will be easier if you use CMake. If you stick to building the project using VS, then instead of dragging the directory of libtorch to your project, you should add the include directory(should be in Project settings/C++) and the libraries (should be in Project settings/Linker) in the project settings.

Could you please tell some details? Which directory should be added to settings/C++? And, which libraries should be added to settings/Linker?
Thanks!

Hi,

Could you please help me resolve issues I’m facing while trying to compile a simple cpp+libtorch code in VS 2017 on Windows:

Thanks a lot! :slight_smile: