Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: newbi with inline C (works)

by tye (Sage)
on Mar 09, 2016 at 16:02 UTC ( [id://1157177]=note: print w/replies, xml ) Need Help??


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
    Thanks. It actually helps. It probably means that this cpan module was not installed correctly

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1157177]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2024-04-23 14:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found