Dean Arnold wrote:



use Inline C => <<'END', ENABLE => 'STRUCTS';
struct Fraction {
long numer;
long denom; };

END use Inline C => <<'END', ENABLE => 'STRUCTS';

struct AnotherStruct {
long x;
long y;
};
END

my $o = Inline::Struct::Fraction->new(4, 3);
print $o->numer, $o->denom, "\n";

my $a = Inline::Struct::AnotherStruct->new(10, 20);
print $a->x, $a->y, "\n";


Works for me ok on win2k with the amendments given above. Otherwise I get the same as you. (I'm using the win32 port of the gcc compiler, not msvc - which seems to be making absolutely no difference at all :-)


It wouldn't surprise me if there's already a way of including the 2 structs within the same Inline block - but I haven't yet found such a solution - haven't really looked all that hard ....

The module is not for production, which I guess means that we should expect the unexpected.

Hth.

Cheers,
Rob


--
Any emails containing attachments will be deleted from my ISP's mail server before I even get to see them. If you wish to email me an attachment, please provide advance warning so that I can make the necessary arrangements.




Reply via email to