----- Original Message ----- From: "Chloe"

use Inline C => Config => ENABLE => "AUTOWRAP" => LIBS => '-L/usr/local/lib -lgretl' => INC => '-I/home/Chloe/gretl-1.9.7/lib/src';

libgretl_init();

__END__
__C__
#include "libgretl.h"
#include "gretl_utils.h"

These are the files generated, but I don't see any .c files. Only the config-*, *.dll, and *.inl have any size.

If they were built, and I guess they were, then they've been cleaned up at the end of the build. (The CLEAN_AFTER_BUILD=>0 config option will prevent that from happening.)

This does work, however
------------------------------------------------
$ perl -le 'use Inline C => q{ double erf(double); }, ENABLE => "AUTOWRAP"; print "$_ @{[erf($_)]}" for (0..10)'
0 0
1 0.842700792949715
2 0.995322265018953

Yes, but this script doesn't:

##################################
use Inline C => Config => ENABLE => "AUTOWRAP";

print "$_ @{[erf($_)]}" for (0..10)

__END__
__C__
double erf(double);

##################################

It outputs: Undefined subroutine &main::erf called at try.pl line 3.
Whereas this script does work:

##################################
use Inline C => Config => ENABLE => "AUTOWRAP";
use Inline C => <<'EOC';
double erf(double);
EOC

print "$_ @{[erf($_)]}" for (0..10)

##################################

See the picture ?
I think something like this might work for you (though I'm not well versed in AUTOWRAP) :

##################################
use Inline C => Config => ENABLE => "AUTOWRAP" => LIBS => '-L/usr/local/lib -lgretl' => INC => '-I/home/Chloe/gretl-1.9.7/lib/src';
use Inline C => <<'EOC';

#include "libgretl.h"
#include "gretl_utils.h"

EOC

libgretl_init();

##################################

Or, perhaps the includes lines need to be rewritten as:
#include <libgretl.h>
#include <gretl_utils.h>

Cheers,
Rob

Reply via email to