[Solved] Error d8021: invalid numeric parameter “/wno CPP” cython_bbox

Windows system, compiling Python_ Bbox, compile parameters:

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()],
    )
]

report errors:

Error d8021: invalid numeric parameter “/wno CPP”

Error d8021: invalid numeric parameter “/wno unused function”

Solution:

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()],
    )
]

Or:

        extra_compile_args=["-std=c99"],

Then compile OK:

Read More: