3

I'll start off by saying I don't really know C++ or cython but I need to write a python wrapper for some c++ code. I may be going about this the wrong way but from what I understand you include a header file in cython with

cdef extern from 'header_file.h':

However, if I have some code like:

#include "gstCamera.h"

#include "glDisplay.h"
#include "glTexture.h"

How do I include all of them? I think that I just don't understand cython well enough and that its not as object oriented as c++ but I'm not sure. Any help would be appreciated.

  • I'm not sure I see the problem? Have you actually tried the really obvious solution of writing multiple `cdef extern from` lines? And what does this have to do with how object oriented anything is? – DavidW Apr 29 '17 at 07:52
  • It assumed there would be another solution because writing 10 nested externs doesn't seem like a great way to do it. –  Apr 29 '17 at 15:46
  • 1
    Why would they be nested? (If this is because you have a header that includes other headers then Cython almost doesn't need to know about that) – DavidW Apr 29 '17 at 16:02
  • Did you solved this? – Rexcirus Dec 12 '19 at 23:56

0 Answers0