4

I wrote my own setup.py file.

But i keep getting a -Wstrict-prototypes warnings which fill the screen.

I tried some few lines to remove it, but it won't work.

Any ideas?

example_module = Extension('_example',
                           sources=['example_wrap.cxx', 'example.cpp'],
                           extra_compile_args=['-std=c++11']
                           )

setup (name = '_example',
       version = '0.1',
       author      = "SWIG Docs",
       description = """Simple swig simple_ex from docs""",
       ext_modules = [example_module],
       py_modules = ["example"],
       )

# removing -Wstrict-prototypes flag which is not valid for c++
cfg_vars = distutils.sysconfig.get_config_vars()
if "CFLAGS" in cfg_vars:
  cfg_vars["CFLAGS"] = cfg_vars["CFLAGS"].replace("-Wstrict-prototypes", "")
Mumfordwiz
  • 1,483
  • 4
  • 19
  • 31
  • Duplicate of https://stackoverflow.com/questions/8106258/cc1plus-warning-command-line-option-wstrict-prototypes-is-valid-for-ada-c-o ? – xioxox Sep 09 '17 at 13:55

0 Answers0