sh make.sh出错 显示cffi.error.VerificationError: CompileError: command 'gcc' failed with exit status 1

编译的时候显示错误:/lib/include/TH/THMath.h:260:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
   for (int i = 0; i < 6; ++i) {
   ^

在编译文件make.sh最上面加以下两行:
export CXXFLAGS="-std=c++11"
export CFLAGS="-std=c99"
顺便查查自己的cuda_arch是不是自己显卡对应的,如1080ti 对应 CUDA_ARCH="-gencode arch=compute_61,code=sm_61 "

你可能感兴趣的:(差记性更要烂笔头)