How to enable -std = C ++ 0x when extending python with C ++

I am embedding Python from C ++. I am using to_wstring () in my C ++ function and the C ++ code will compile when I add -std = C ++ 0x. But when compiling python code using python setup.py build I get the following warning and error

cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++     [enabled by default]
test.cpp: In function ‘std::wstring convert_to_wstring(unsigned char*, int)’:
test.cpp:180:57: error: ‘to_wstring’ was not declared in this scope
                     w_string += to_wstring(stream[i]) + L".";

      

how to add -std = c ++ 0x to python compilation?

Thank you in advance

+3


source to share





All Articles