I am building a C++ extension for use in Python. I am seeing this warning being generated during the compilation process - when a type:
python setup.py build
The following code fragment in setup.py will remove all instances of this pesky flag:
# Remove the "-Wstrict-prototypes" compiler option, which isn't valid for C++.
import distutils.sysconfig
cfg_vars = distutils.sysconfig.get_config_vars()
for key, value in cfg_vars.items():
if type(value) == str:
cfg_vars[key] = value.replace("-Wstrict-prototypes", "")
# ==================================