I'm wrapping a C++ class with Python, and I cannot compile any C++11 features with the Cython module.
Everything compiles okay when compiling the C++ alone. But when I run this setup.py below:
setup(
ext_modules = cythonize(
"marketdata.pyx", # our Cython source
sources=["cpp/OBwrapper.cpp, cpp/OrderBook/orderbook.h, cpp/OrderBook/orderbook.cpp"], # additional source file(s)
language="c++", # generate C++ code
extra_compile_args=["-std=c++11"]
))
In my .pyx file header:
# distutils: language = c++
# distutils: sources = cpp/OBwrapper.cpp cpp/OrderBook/orderbook.cpp
I get a ton of errors that have to do with them not recognizing c++11 commands, like 'auto'.
For example:
cpp/OrderBook/orderbook.cpp(168) : error C2065: 'nullptr' : undeclared identifier
How can I get this to work?