Hello,
I am once again trying to use torch on windows 10, but it keeps giving me headaches. I have now tried to use the VC compiler (14.20) to compile the tutorial project, but the linking part seems to fail.
In detail:
the CmakeLists:

cmake_minimum_required (VERSION 3.8)
project (“example-app”)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_PREFIX_PATH C:/Users/Michael/Documents/GitHub/Torch_build/libtorch_win)
find_package(Torch REQUIRED)
set(TARGET_SOURCES example.cpp)
add_executable(example ${TARGET_SOURCES})
target_link_libraries(example “${TORCH_LIBRARIES}”)

The code in example.cpp:

#include <torch/torch.h>
#include 
int main() {
torch::Tensor tensor = torch::rand({ 2, 3 });
std::cout << tensor << std::endl;
}

It compiles (granted with a zillion of warnings within the torch files) and produces an executable, but when I run it:

dllerror.PNG2659×1063 99 KB

I dont get these errors on Ubuntu and can work with torch fine on it. It should find and link the torch.dll automatically given the linking command in Cmake, shouldn’t it? Can someone point me towards the reason why this is failing for me on Windows?
best reagrds,
Michael