Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion how to subclass dynamic PMCs?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Michal Wallace  
View profile  
 More options Jan 21 2004, 2:00 pm
Newsgroups: perl.perl6.internals
From: mic...@sabren.com (Michal Wallace)
Date: Wed, 21 Jan 2004 13:49:43 -0500 (EST)
Local: Wed, Jan 21 2004 1:49 pm
Subject: how to subclass dynamic PMCs?

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: mic...@sabren.com
hosting: http://www.cornerhost.com/
my site: http://www.withoutane.com/
--------------------------------------


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.