SWIG, C++, and Mac OS X

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Siddartha Krishnan

    SWIG, C++, and Mac OS X

    Hi,

    I'm new to using python and SWIG. I am running Mac OS X 10.4. I have
    a C++ class which I want to access from python, however I am unable
    to compile it as a shared module in Mac OS X.

    I have tried using Distutils and have successfully created a C
    extension module, however I am unable to create a C++ extension
    module (I dont know how to pass the -c++ parameter to swig in the
    setup.py file.

    I'd appreciate it If anyone could help me with creating a setup.py
    file for use with c++ or compiling a shared module on OS X.

    Thanks!
  • nate

    #2
    Re: SWIG, C++, and Mac OS X

    why are you modifying your setup.py file? can't you just run:
    swig -c++ -python exampleFile.i
    ?

    have you seen http://www.swig.org/tutorial.html , does it describe
    something like what you'd like to do?

    n

    Comment

    Working...