#! perl -slw use strict; use Config; use Inline C => Config => BUILD_NOISY => 1, CCFLAGS => $Config{ccflags}." -DDEBUG=1"; use Inline C => <<'END_C', NAME => 'Example', CLEAN_AFTER_BUILD =>0; #include #include int add( int a, int b ) { int result; result = a + b; return result; } int main () { /* char *a = "print \"Hello from C!\\n\";"; */ code(); return 0; } END_C print "Everything went well ;)","\n"; #### package Example; use 5.006; use strict; use base qw/Exporter DynaLoader/; our $VERSION = '0.00'; our @EXPORT_OK = qw/hello/; bootstrap Example $VERSION; 1;