Using torch::jit::load in Xcode for C++

Hi,
I have trained a model in PyTorch, traced it and saved it with traced_script_module.save(). Now I want to import the traced model in my XCode C++ code. I tried #include <torch/script.h> and supplied the relevant path in Build Settings. I also download libtorch and added its path in library search paths. Yet I receive a linker error.
Is there a step by step guide to load and evaluate traced PyTorch model in C++?

Having the same issue. Did you figure it out?

Try
#include <torch/csrc/jit/serialization/import.h>
If that works, you may look here Cmake List for Libtorch and ATen - #2 by BiggestZocker what the problem was and how to avoid it.

Hi. Apologies for the late follow up. I was in other project. I tried including the header and I get the same linker error again. " undefined Symbols.
Linker command failed with exit code 1 (use -v to see invocation) ".
What is the solution to this?