I followed the instruction of this 8 to build a custom cpp extension.
The extension code works fine on Ubuntu but fails on Win10.
When I run python setup.py install it gives bunches of warnings and an error like below:

C:\Users\jiang\Miniconda3\envs\pytorch\lib\site-packages\torch\lib\include\torch\csrc\api\include\torch/torch.h(7):
fatal error C1021: invalid preprocessor command 'warning’
error: command ‘C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe’ failed with exit status 2

I didn’t paste those warnings because there are too many.
Anyone knows how to fix this?
Thank you!