fatal error C1021: 无效的预处理器命令“warning”

论坛 期权论坛 编程之家     
选择匿名的用户   2021-5-28 19:02   28   0

这个没有预训练:https://github.com/jacke121/CenterNetPerson

这个是源码研读:https://github.com/takooctopus/CenterNet-Tako

这两个一样,都需要编译,编译下面这个库时报错:

D:\detect\CenterNetPerson\models\py_utils\_cpools

fatal error C1021: 无效的预处理器命令“warning”

解决方法:

#include <torch/torch.h>

改为:#include <torch/extension.h>

python setup.py build develop

报错内容:
D:\ProgramData\Miniconda3\lib\site-packages\torch\include\torch\csrc\api\include\torch/torch.h(7): fatal error C1021: 无效的预处理器命令“warning”
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\amd64\\cl.exe' failed with exit status 2

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:3875789
帖子:775174
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP