This is my sample Perl program, and I'm trying to call a library routine. I 
think it should work, but don't know how to debug what it is doing in the 
background or where it is failing. It is not providing any error messages that 
are useful. I don't see any options to turn on verbose or debugging.

--------------------------------------------
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"
/*void libgretl_init();*/
----------------------------------------------

This is the error message
-------------------------------------------------
$ perl sample.pl
Undefined subroutine &main::libgretl_init called at sample.pl line 4.
-------------------------------------------------------------------

These are the files generated, but I don't see any .c files. Only the config-*, 
*.dll, and *.inl have any size.
-----------------------------------------
$ ls -R _Inline/
_Inline/:
build config-i686-cygwin-thread-multi-64int-5.010001 lib
_Inline/build:
_Inline/lib:
auto
_Inline/lib/auto:
e_03e7
_Inline/lib/auto/e_03e7:
e_03e7.bs e_03e7.dll e_03e7.inl
------------------------------------------------------------

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
...
----------------------------------------------
 
System version
----------------------------------------
$ uname -a
CYGWIN_NT-5.1 dumbopc 1.7.11(0.260/5/3) 2012-02-24 14:05 i686 Cygwin
-----------------------------------------

The header file:
---------------------------------
$ find gretl-1.9.7 -name \*.h | xargs grep libgretl_init
gretl-1.9.7/lib/src/gretl_utils.h:void libgretl_init (void);
----------------------------------------------

Reply via email to