in reply to newbi with inline C
For what it is worth, that code works for me:
$ perl ic.pl test Hello Ingy
Update: Following a suggestion from chatter:
#!/usr/bin/perl -w use lib '/usr/share/perl5/Module/Install'; use Inline C => Config => BUILD_NOISY => 1, CLEAN_AFTER_BUILD => 0; print "test\n"; greet('Ingy'); __END__ __C__ void greet(char* name) { printf("Hello %s\n", name); }
yields:
$ perl ic.pl test Undefined subroutine &main::greet called at ic.pl line 5.
(Probably because the extra arguments on the 'use' line override the default behavior of look for "__C__".)
- tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: newbi with inline C (works)
by kopolov (Acolyte) on Mar 09, 2016 at 16:05 UTC |