http://qs321.pair.com?node_id=937808


in reply to Re^2: Exploring Inline::C (Status Update for Inline::CPP)
in thread Exploring Inline::C (Generating primes)

I've taken on Co-maintainership for Inline::CPP

This is excellent news!!

I almost established co-maintainership of Inline::CPP a couple of years back, but I kept losing contact with Neil at critical moments, and it never happened. (That was actually quite fortuitous as I'm not the right person for the job, anyway - my CPP skills are best described in terms that don't involve the use of the word "skill" ;-)

Version 0.29 builds and tests for me on my 32-bit builds of perl (where I'm using the mingw.org port of gcc-4.5.2).

But ... things don't go quite so well if the compiler to be used is not called 'g++'.
In CPP.pm we have:
sub validate { my $o = shift; $o->{ILSM}{MAKEFILE}{CC} ||= 'g++'; # default compiler $o->{ILSM}{MAKEFILE}{LIBS} ||= ['-lstdc++']; # default libs
That effectively hard-codes in 'g++' and '-lstdc++'.
You'll note that the Makefile.PL rewrites CPP.pm, replacing the strings '@COMPILER' and '@DEFAULTLIBS' with the selected compiler and libs ... except that there's now *no* such strings as '@COMPILER' and '@DEFAULTLIBS' anywhere in CPP.pm ... so CPP.pm stays exactly as it was ... which is fine if (and only if) you're using 'g++'.

Do you see what I mean ?

Cheers,
Rob