如何在使用c ++扩展python时包含-std = c ++ 0x

时间:2014-12-19 19:39:16

标签: python c++

我用Python嵌入Python。 我在我的c ++函数中使用to_wstring(),当我添加-std = c ++ 0x时,c ++代码被编译。 但是在使用python setup.py构建编译python代码时 我收到以下警告和错误

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".";

如何在Python编译中添加-std = c ++ 0x?

提前致谢

0 个答案:

没有答案