The ordinal 961 could not be located in the dynamic link library

This is a follow up question about this one . I gave up on that momentiraliy and instead followed this guide
and created a simple cmake project, built it and opened the project in visual studio for further development.
However, After the successful build, executing the executable fails with this error message :

The ordinal 961 could not be located in the dynamic link library
D:\Codes\fac_ver\cpp\port\ModelEmbeder\libtorch\lib\torch_cpu.dll

Why am I seeing this? I’m using Visual Studio 2019 v142 and downloaded the latest libtorch (nighlies) (the debug version currently)

Any help is greatly appreciated
Thanks a lot in advance

OK, Thanks to God I found out the issue.
This happens becasue of a conflict between two versions of libiomp5md.dll . I had previously installed Anaconda so I had this , when I added the libtorch , there is a nother version there. so since Anaconda was in the PATH variables higher than my libtorch lib folder! it always tried to use the anacondas and it’d fail with that error.
moving the lib higher than anaconda fixed this for me !