and here's what happens when I run 'perl autowrap.pl' (using your amendments to C.pm):use warnings; use Inline C => Config => BUILD_NOISY => 1, TYPEMAPS => 'simple_typemap.txt', AUTO_INCLUDE => '#include "D:/C/simple.h"', CLEAN_AFTER_BUILD => 0, ENABLE => AUTOWRAP, LIBS => '-LD:/C -lsimple'; use Inline C => q{simple_double simple(simple_double); }; print simple(1.032);
'simple.h' looks like:. . Starting Build Compile Stage Starting "perl Makefile.PL" Stage String found where operator expected at Makefile.PL line 8, near "'NAM +E'" (Missing semicolon on previous line?) String found where operator expected at Makefile.PL line 9, near "'aut +owrap_pl_e 826'" (Missing semicolon on previous line?) String found where operator expected at Makefile.PL line 10, near "'IN +C'" (Missing semicolon on previous line?) String found where operator expected at Makefile.PL line 11, near "'-I +D:/pscrpt/ inline/special'" (Missing semicolon on previous line?) String found where operator expected at Makefile.PL line 12, near "'LI +BS'" (Missing semicolon on previous line?) String found where operator expected at Makefile.PL line 16, near "'VE +RSION'" (Missing semicolon on previous line?) String found where operator expected at Makefile.PL line 17, near "'0. +00'" (Missing semicolon on previous line?) syntax error at Makefile.PL line 4, near "[" Execution of Makefile.PL aborted due to compilation errors. A problem was encountered while attempting to compile and install your + Inline C code. The command that failed was: D:\perl58_M\5.8.8\bin\perl.exe Makefile.PL The build directory was: D:\pscrpt\inline\special\_Inline\build\autowrap_pl_e826 To debug the problem, cd to the build directory, and inspect the outpu +t files. at autowrap.pl line 11 BEGIN failed--compilation aborted at autowrap.pl line 11.
and 'simple_typemap.txt' looks like:#define simple_double double simple_double simple(simple_double d);
Perhaps it's just a simple syntax error in the code you posted ... but I couldn't spot it. It's creating a Makefile.PL that looks like this:simple_double T_S_DOUBLE INPUT T_S_DOUBLE $var = (simple_double)SvNV($arg) OUTPUT T_S_DOUBLE sv_setnv($arg, (simple_double)$var);
Gotta go to bed :-)use ExtUtils::MakeMaker; my %options = ( 'TYPEMAPS' [ 'D:\\perl58_M\\5.8.8\\lib\\ExtUtils\\typemap', 'D:\\pscrpt\\inline\\special\\simple_typemap.txt' ] 'NAME' 'autowrap_pl_e826' 'INC' '-ID:/pscrpt/inline/special' 'LIBS' [ '-LD:/C -lsimple' ] 'VERSION' '0.00' ); WriteMakefile(%options); # Remove the Makefile dependency. Causes problems on a few systems. sub MY::makefile { '' }
In reply to Re^6: What's the difference between a hash ?
by syphilis
in thread What's the difference between a hash ?
by syphilis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |