我在计算机上安装了PyTorch。我认为添加标头#include "c10/macros/Macros.h"
会有问题,但我无法解决。
我将“附加包含目录”设置如下:
C:\pytorch
C:\pytorch\caffe2
然后运行以下最简单的代码:
#include "stdafx.h"
#include <iostream>
#include <caffe2/core/init.h>
int main(int argc, char** argv) {
caffe2::GlobalInit(&argc, &argv);
return 0;
}
,并在下面给出此错误:
Error (active) cannot open source file "c10/macros/cmake_macros.h" test2 c:\pytorch\c10\macros\Export.h 44
Error (active) cannot open source file "c10/macros/cmake_macros.h" test2 c:\pytorch\c10\macros\Macros.h 21
Error C1083 Cannot open include file: 'c10/macros/cmake_macros.h': No such file or directory test2 c:\pytorch\c10\macros\macros.h 21
有帮助吗?