python - How to specify C++11 with distutils? -


I have a module that should be compiled with C ++ 11. On GCC and Clang, this means the std = c ++ 11 switch on the old compiler, or std = c ++ 0x .

Python is not compiled with this switch, so in the distroits it is not included when compiling the module.

What is the preferred way of compiling the C ++ 11 code with distutils?

your extra_compile_args parameter distutils.core.Extension can:

  ext = extension ('foo', source = [....], libraries = [....], extra_compile_args = ['- std = c ++11 '], ....)   

Note that this platform is completely dependent. It will not work on some older versions of GCC and Ragad.

Comments

Popular posts from this blog

How can I add a seperate action listener to all 14 of my buttons at once that can determine player turn?(java) -

Simple file compression in C -

php - Sorting an multidimension array using usort fails -