Did you load PyTorch before you did?
You might have to manually link to torch and / or c10.
On Linux the default seems to be to not explicitly link to torch but rely on “import torch” having made the symbols globally visible.
Best regards
Thomas