in reply to About Moo and Inline::C
There are many ways to have fun with Perl + Inline::C. I chose to separate the Perl and C source files. In fact, created Sandboxing with Perl + MCE + Inline::C some time back. The algorithm3.pl script works out of the box. The other two scripts require dependencies mentioned in the README file.
./bin/ algorithm3.pl primesieve.pl primeutil.pl ./src algorithm3.c bits.h output.h sandbox.h sprintull.h typemap
The following is the Inline::C bits inside algorithm3.pl. I chose to hide the .Inline directory under the base dir.
BEGIN { $ENV{PERL_INLINE_DIRECTORY} = "${base_dir}/.Inline"; mkdir "${base_dir}/.Inline" unless -d "${base_dir}/.Inline"; } use Inline 'C' => Config => CCFLAGSEX => "-I${base_dir}/src -O2 -fsigned-char -fomit-frame-poin +ter", TYPEMAPS => "${base_dir}/src/typemap"; use Inline 'C' => "${base_dir}/src/algorithm3.c";
Well, this may not be a perfect solution. I am still learning Inline::C.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: About Moo and Inline::C
by karlgoethebier (Abbot) on Jun 10, 2015 at 14:21 UTC |