* Inheriting from a class inside a shared object?
@ 2002-04-04 6:52 Graeme Phillipson
0 siblings, 0 replies; only message in thread
From: Graeme Phillipson @ 2002-04-04 6:52 UTC (permalink / raw)
To: gcc-help
Hello,
I'm trying to use swig so that I can extend a project I've already created to
have Python scripting. However I've run into some problems (I've never used
swig before BTW). I can't use the template makefiles provided, because I
already have a makefile, so I've edited Makefile.am to include:-
arguspythoninterface_wrap.o: arguspythoninterface_wrap.c
$(CC) -c -I/usr/include/python2.1/ -I/usr/lib/python2.1/config/ $<
arguspythoninterface_wrap.c: arguspythoninterface.i
swig -v -c++ -python arguspythoninterface.i
and arguspythoninterface_wrap.o is linked against when building the end
result executeable.
I also added:-
Py_Initialize();
swig_add_builtin();
PyImport_Inittab = _SwigImport_Inittab;
To my python startup code, and made a copy of embed.i and removed its main
function. However when I try this, linker errors spew forth from every corner
of my project.
The other way I thought of doing this was to start again with the interface
and make a sharded modelu my main program can link against. To test this I
tried moving examplemodule.so (which I had made from the tutorial) to my
program directory and seeing if I could load module example. When I try it
from the command line it works, but if I try it from my program it can't find
the module.
If anyone could provide me with any help in using either of those two methods
it would be greatly apprecideted.
Thanks,
Graeme Phillipson.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-04-04 13:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-04 6:52 Inheriting from a class inside a shared object? Graeme Phillipson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).