On Thu, 22 Jan 2004, Leopold Toetsch wrote: > Michal Wallace <[EMAIL PROTECTED]> wrote: > > > I'm trying to make a dynamically loaded PMC that > > subclasses another dynamically loaded PMC. > > Its a linker problem, but not too simple. Your analysis is correct: > pistring needs the symbol Parrot_PiSequence_get_integer, so you have to > provide it:
Thanks Leo! You rock!!! > I did something like this: > > $ make -C dynclasses > $ cp dynclasses/pisequence.so blib/lib/libpisequence.so Aha! I was trying to figure out how to do -lpisequence. It didn't occur to me to just RENAME it. :) > $ cd dynclasses; cc -shared -L/usr/local/lib -o pistring.so \ > -I../include -I../classes -L../blib/lib -lparrot pistring.c \ > -lpisequence ; cd .. > $ cp dynclasses/pistring.so runtime/parrot/dynext/ > > $ parrot wl.imc # run your test program > 51 > 52 Awesome! Thanks again! :) > I also had -Wl,-E in the Makefile, when compiling pisquence. I don't > know if its necessary. > > Another (untested) possibility: you could try to append the 2 pi*.c > files into another one and then compile the combined source to a shared > lib. That makes sense. I'll try it. If it works, I'll patch pmc2c2.pl to do do this automatically. I'm sure this won't be the last time someone wants to provide a whole set of classes at once. > leo Sincerely, Michal J Wallace Sabren Enterprises, Inc. ------------------------------------- contact: [EMAIL PROTECTED] hosting: http://www.cornerhost.com/ my site: http://www.withoutane.com/ --------------------------------------