Hello Monks, I'm seeking to be at peace with Inline::CPP. This is my test code:
#!/usr/bin/perl use strict; use warnings; use Inline 'info', 'force', 'clean'; use Inline 'CPP'; print "9 + 16 = ", add(9, 16), "\n"; print "9 - 16 = ", subtract(9, 16), "\n"; __END__ __CPP__ random junk; int add(int x, int y) { return x + y; } int subtract(int x, int y) { return x - y; }
You'll note the glaring random junk that should cause gcc to error, but it doesnt, it compiles fine, and then perl complains that &main::add is undefined. Here is the output:
$ ./testInline.pl <-----------------------Information Section--------------------------- +--------> Information about the processing of your Inline CPP code: Your source code needs to be compiled. I'll use this build directory: /home/andy/projects/rigel/libs/_Inline/build/testInline_pl_6b67 and I'll install the executable as: /home/andy/projects/rigel/libs/_Inline/lib/auto/testInline_pl_6b67/tes +tInline_pl_6b67.so <-----------------------End of Information Section-------------------- +--------> Use of uninitialized value in join or string at /usr/local/share/perl5 +/Inline/C.pm line 603. Undefined subroutine &main::add called at ./testInline.pl line 7.
I'm using Slackware64 14.2+current, perl 5.28, packages installed via cpanm. If I test with Inline::C is works fine, but CPP doesn't. I'm lost, and cannot seem to find my way.
Thanks for your time.
In reply to Inline::CPP code ignored by jaandy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |