windows系统,编译cython_bbox时,编译参数:
from setuptools import setup, find_packages, Extension
import numpy as np
ext_modules = [
Extension(
"cython_bbox",
["utils/cython_bbox.pyx"],
extra_compile_args=["-Wno-cpp", "-Wno-unused-function"],
include_dirs=[np.get_include()],
)
]
报错:
error D8021 :无效的数值参数“/Wno-cpp”
error D8021 :无效的数值参数“/Wno-unused-function”
解决方法:
from setuptools import setup, find_packages, Extension
import numpy as np
ext_modules = [
Extension(
"cython_bbox",
["utils/cython_bbox.pyx"],
extra_compile_args=["-std=c++14"],
include_dirs=[np.get_include()],
)
]
或者:
extra_compile_args=["-std=c99"],
然后编译ok:
代码来源
版权说明 : 本文为转载文章, 版权归原作者所有 版权申明
原文链接 : https://blog.csdn.net/jacke121/article/details/121247439
内容来源于网络,如有侵权,请联系作者删除!