Howdy,

I am trying to load an installed perl6.pbc from the Parrot embedding
API like this:

#include "parrot/embed.h"
#include "parrot/extend.h"

Parrot_Interp interp;

int main(int argc, char *argv[])
{
    Parrot_PMC func_pmc;
    Parrot_String err, filename;

    Parrot_set_config_hash();
    interp = Parrot_new(NULL);
    filename = Parrot_str_new(interp,
"/Users/leto/svn/parrot/installed_parrot/lib/2.4.0-devel/languages/perl6/perl6.pbc");
    Parrot_load_bytecode(interp,filename);

}

Compiled with:
gcc embed2.c -o embed2 `pkg-config --cflags --libs parrot`
/Users/leto/svn/parrot/installed_parrot/lib//2.4.0-devel/parrot_config.o

When run, it gives the error:

Class '[ 'ClassToBe' ]' not found
current instr.: 'perl6;ClassHOW;new' pc 4091 (src/gen/Attribute.pir:35)
called from Sub 'perl6;ClassHOW;new_class' pc 5531
(src/metamodel/ClassHOW.pir:749)
called from Sub 'perl6;RoleHOW;onload' pc 5837 (src/metamodel/ClassHOW.pir:874)
called from Sub 'perl6;Perl6;Compiler;main' pc 284185
(src/gen/perl6-actions.pir:15235)
... call repeated 1 times

If I run parrot on the same perl6.pbc, it works. What am I missing?
Any hints would be greatly appreciated.

I am currently using Parrot trunk ( revision 47312 ) and Rakudo master
( a0b6d74d ).

Duke



-- 
Jonathan "Duke" Leto
jonat...@leto.net
http://leto.net

Reply via email to