Actually, this code is just an example of my code... Turtle is just a Inline::C module that I wrote months ago, and would like to use some of it's functions in Rabbit. The header part is virtually the same. So, Turtle could be...

#!/usr/bin/perl
package Turtle;
my $VERSION = '1.17';
use Inline C => 'DATA',
  VERSION => '1.17',
  NAME => 'Turtle',
  OPTIMIZE => '-g',
  CLEAN_AFTER_BUILD => 0,
  ;

use 5.008;
use strict;
use warnings;


sub relative_speed { my ($self, $arg) = @_; return _relative_speed($arg); }

1;

__DATA__
int _relative_speed(int arg) {
   int speed;
   speed = arg * 0.25;
   return speed;
}

-------------------------------------------------

thank you!

Patrick LeBoutillier wrote:

Nicholas,

Can you send the code for Turtle.pm (or at least the "use Inline" part)?

Patrick

On Apr 5, 2005 2:15 PM, Nicholas Wehr <[EMAIL PROTECTED]> wrote:


Sorry I wan't clearer. Here's an example of what I'm doing. Rabbit is

the new module version 0.14.  It is trying to 'use' an installed module
'Turtle' version 1.17.  They both use Inline::C.  Inline is generating
this error during make:



The version '0.14' for module 'Turtle' doe not match
the version '1.17' for Inline section 'Turtle'.


Here's the example Inline module:

#!/usr/bin/perl
package Rabbit;
my $VERSION = '0.14';
use Inline C => 'DATA',
  VERSION => '0.14',
  NAME => 'Rabbit',
  OPTIMIZE => '-g',
  CLEAN_AFTER_BUILD => 0,
  FILTERS => 'Strip_POD',
  ;

use 5.008;
use strict;
use warnings;
use Turtle;   # <-- the problem happens here during compile

sub gauge_speed {
  my $self = shift;
  $self->proc_speed();
  my $turtle_result = Turtle->relative_speed($self->speed);
  die $! unless $turtle_result;
  return $turtle_result;
}

Thanks!











Reply via email to