Visual Studio C1083不能包含标题

时间:2019-07-26 14:23:17

标签: c++ windows visual-studio pytorch

我在计算机上安装了PyTorch。我认为添加标头#include "c10/macros/Macros.h"会有问题,但我无法解决。

you can see headers here

我将“附加包含目录”设置如下:

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  

有帮助吗?

0 个答案:

没有答案