I am trying to wrap a c++ library using cython. The c++ header file say MyFile.h declares a class like this:
class MyClass {
public:
enum MyEnum{
TYPE0 = 0,
TYPE1 = 1,
TYPE2 = 2,
};
MyClass(MyEnum val=TYPE0){
// ...
}
// ...
}
The pxd file has this:
cdef extern from "<MyFile.h>":
cdef cppclass MyClass:
cdef enum MyEnum:
TYPE0 = 0
TYPE1 = 1
TYPE2 = 2
MyClass(MyEnum val=TYPE0) except +
But cython does not compile it. How do I do this?