build error
yjhjstz opened this issue · comments
Jianghua.yjh commented
cmake -DCMAKE_PREFIX_PATH=$PWD/../libtorch ..
got error:
[ 50%] Building CXX object CMakeFiles/example-app.dir/example-app.cpp.o
/home/luban/cpp-pytorch/example-app.cpp:3:27: fatal error: torch/Tensor.h: No such file or directory
#include <torch/Tensor.h>
Kai Han commented
please provide the correct path of libtorch
sagewang commented
@yjhjstz @iamhankai @1343464520 怎么解决/data/2019-06/libtorch/cpp-pytorch/example-app.cpp:3:27: fatal error: torch/Tensor.h: 没有那个文件或目录
此问题?
我的libtorch path没有问题
请教一下,谢谢!
Kai Han commented
#include "torch/Tensor.h"
Tyr like this?
Evoluange commented
在CMakeLists.txt里把GCC改成14,再把#include <torch/Tensor.h> 注掉就行了
Peng commented
改成:#include<ATen/core/Tensor.h>