Hi all,
I'm hoping this is just a simple linker option, but
I've been reading "ld" manuals for the past few
hours and I just don't get it. :)
I'm trying to make a dynamically loaded PMC that
subclasses another dynamically loaded PMC.
I made two files in parrot/dynclasses/ :
// file 1: pisequence.pmc
#include "parrot/parrot.h"
#define enum_class_PiSequence -1
pmclass PiSequence need_ext dynpmc {
INTVAL get_integer () {
return 0;
}
}
// file 2: piobject.pmc
#include "parrot/parrot.h"
#define enum_class_PiString -1
pmclass PiString extends PiSequence need_ext dynpmc {
}
I added these to the Makefile, ran make -C dynclasses
and now, I have two *.so files:
% find runtime -name "pi*.so"
runtime/parrot/dynext/pisequence.so
runtime/parrot/dynext/pistring.so
Then I try to run this:
.sub __main__
loadlib P0, "pisequence"
find_type I0, "PiSequence"
print I0
print "\n"
loadlib P1, "pistring"
find_type I1, "PiString"
print I1
print "\n"
end
.end
Output is:
Couldn't load 'runtime/parrot/dynext/pistring': \
runtime/parrot/dynext/pistring: cannot open shared object file: \
No such file or directory
51
Couldn't load 'runtime/parrot/dynext/pistring': \
runtime/parrot/dynext/pistring: cannot open shared object file: \
No such file or directory
0
If I copy the get_integer function to PiString
instead of trying to inhert, everything works:
51
52
It seems the problem is that pistring.so can't
load because it can't find a definition for
Parrot_PiSequence_get_integer... Even though
it's defined in the other *.so file that's
already loaded.
I don't think this is a bug... I think I just
don't know what I'm doing. Can someone help? :)
Sincerely,
Michal J Wallace
Sabren Enterprises, Inc.
-------------------------------------
contact: [EMAIL PROTECTED]
hosting: http://www.cornerhost.com/
my site: http://www.withoutane.com/
--------------------------------------