DH [13/08/03 02:58 -0700]: > Out of the box, it fails with [...] > C:\PROGRA~1\MICROS~2\VC98\INCLUDE\math.h(514) : error C2894: templates cannot be > declared to have > 'C' linkage > NMAKE : fatal error U1077: 'cl' : return code '0x2' > Stop.
Thanks. This problem appears to be specific to Microsoft C++. I've heard no reports of this breaking on UNIX-like operating systems. > After I work my magic ( thanks to > http://perlmonks.com/index.pl?node_id=253560 ), Here's the patch I'll apply: ==== //depot/cpan/Inline-CPP/CPP.pm#6 - /home/nwatkiss/dev/cpan/Inline-CPP/CPP.pm ==== Index: cpan/Inline-CPP/CPP.pm --- cpan/Inline-CPP/CPP.pm.~1~ Wed Aug 13 10:43:58 2003 +++ cpan/Inline-CPP/CPP.pm Wed Aug 13 10:43:58 2003 @@ -40,7 +40,12 @@ '.any' => 0, '.all' => 0, }; - $o->{ILSM}{AUTO_INCLUDE} ||= <<END; + $o->{ILSM}{AUTO_INCLUDE} ||= ($^O eq 'MSWin32' ? <<WIN32 : '') . <<END; +#include <math.h> +#include <stdio.h> +#include <iostream.h> +#include <stdlib.h> +WIN32 #ifndef bool #include <%iostream%> #endif End of Patch. I've tested the latter on Linux, and it appears to work. Neil