newbie-question: extending python with c++

merman merman at freenet.de
Mon Apr 15 16:26:56 EDT 2002


"Brian Quinlan" <brian at sweetapp.com> schrieb im Newsbeitrag
news:mailman.1018890724.31468.python-list at python.org...
> Merman wrote:
> > I have a c++ -class; I can compile this class successful as
> standalone-app.
> > No problem.
> > Now I want to work with swig.
> >
> > There are three files: Tree.cpp, Tree.h, Tree.i
> >
> > first step:
> > swig -python -c++ -o Tree_wrap.cpp Tree.i (output is Tree_wrap.cpp -
> it's
> > ok)
> >
> > second step:
> > g++ -c Tree.cpp Tree_wrap.cpp -IC:\python22\include (also ok - output
> are
> > Tree.o and Tree_wrap.o)
> >
> > third step - *build*:
> > g++ Tree.o Tree_wrap.o -shared -o Tree.dll (this line throws lots of
> > failures - whats wrong?)
>
> Where need to link with Pythonxx.lib. But instead of this manual crap,
> you should just write a simple distutils setup script.
>
> Cheers,
> Brian

Ok Brian, and how can I write a disutils setup script? I don't know that!
Read the subject Brian: newbie-question!!!

o-o

thomas






More information about the Python-list mailing list