cython + scons + c++

Discussion in 'Python' started by Neal Becker, Mar 8, 2012.

  1. Neal Becker

    Neal Becker Guest

    Is there a version of cython.py, pyext.py that will work with c++?

    I asked this question some time ago, but never got an answer.

    I tried the following code, but it doesn't work correctly. If the commented
    lines are uncommented, the gcc command is totally mangled.

    Although it did build my 1 test extension OK, I didn't use any libstdc++ - I
    suspect it won't link correctly in general because it doesn't seem to treat the
    code as c++ (treats it as c code).

    cyenv = Environment(PYEXT_USE_DISTUTILS=True)
    cyenv.Tool("pyext")
    cyenv.Tool("cython")
    import numpy

    cyenv.Append(PYEXTINCPATH=[numpy.get_include()])
    cyenv.Replace(CYTHONFLAGS=['--cplus'])
    #cyenv.Replace(CXXFILESUFFIX='.cpp')
    #cyenv.Replace(CYTHONCFILESUFFIX='.cpp')
     
    Neal Becker, Mar 8, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David Lees

    HowTo Use Cython on a Windows XP Box?

    David Lees, Sep 1, 2007, in forum: Python
    Replies:
    5
    Views:
    1,185
    Paul McGuire
    Sep 1, 2007
  2. Replies:
    13
    Views:
    615
    Robert Hicks
    Mar 29, 2008
  3. Stefan Behnel

    Cython code generation for Py3 complete

    Stefan Behnel, May 22, 2008, in forum: Python
    Replies:
    0
    Views:
    268
    Stefan Behnel
    May 22, 2008
  4. Replies:
    1
    Views:
    381
    Robert Kern
    Jun 24, 2008
  5. Tommy Grav

    Cython dynamic library problem

    Tommy Grav, Sep 18, 2008, in forum: Python
    Replies:
    3
    Views:
    339
    Tommy Grav
    Sep 18, 2008
Loading...

Share This Page