@glaringlee
My main.cpp just had the example code from the cppdocs. But now I’ve done as you suggested and just created a main.cpp with the torch.h header file like this:

#include <torch/torch.h>

int main() {

return 0;
}


But Im still getting the same compiler errors:

  
      gist.github.com
  
  
    https://gist.github.com/shyney7/6430c088cdeff1d120c7620aa9ab2289 7
Libtorch cross-compilation error QNX
marcel@ubuntu:~/Documents/libtorch_cross_test/build$ source ~/qnx700/qnxsdp-env.sh 
QNX_HOST=/home/marcel/qnx700/host/linux/x86_64
QNX_TARGET=/home/marcel/qnx700/target/qnx7
MAKEFLAGS=-I/home/marcel/qnx700/target/qnx7/usr/include
marcel@ubuntu:~/Documents/libtorch_cross_test/build$ make
[ 50%] Building CXX object CMakeFiles/example-app.dir/main.cpp.o
In file included from /home/marcel/Documents/libs/libtorch/include/c10/core/Allocator.h:4:0,
                 from /home/marcel/Documents/libs/libtorch/include/ATen/ATen.h:3,
                 from /home/marcel/Documents/libs/libtorch/include/torch/csrc/api/include/torch/types.h:3,
                 from /home/marcel/Documents/libs/libtorch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
This file has been truncated. show original




  
  
    
    
  
  


I hope you can help me with that.