----- Original Message -----
From: "Todd H" <[EMAIL PROTECTED]>
To: <inline@perl.org>
Sent: Friday, April 20, 2007 6:11 AM
Subject: Use gcc with Inline::C
Hi,
I have Microsoft Visual C++ 6.0 installed and am using
Inline:CC with PERL. My questions is, can I use GNU
"gcc" instead of VC++ to compile my Inline C code? Is
this a trivial change?
Assuming that you're using the MinGW port of gcc, and that you're running a
recent build of ActivePerl (build 817 or later), then it's a very trivial
thing to do. All you need is for MinGW/bin to be listed *before* the VC/bin
in the path.
Normally, one uses dmake (instead of nmake) with MinGW, so you might like to
get a copy of it from http://search.cpan.org/dist/dmake/ and install it.
(Again, you would want 'dmake/bin' to be listed ahead of 'VC/bin' in the
path.) Mind you, I *think* that this step is unnecessary - ie I think
'nmake' will work just fine with MinGW and Inline::C, but if I'm wrong about
that, then grab 'dmake'.
For earlier builds of ActivePerl (or, indeed, any other VC++-built perls)
you can achieve the same result with ExtUtils::FakeConfig.
Inline::C does let you nominate the compiler to use:
use Inline C => Config =>
CC => 'gcc';
I've not played with that at all. I don't really expect it to provide a lot
of milage, as there are usually other Config.pm settings that need to be
changed when you switch compilers. (With recent builds of ActivePerl, and
with EU::FC, those "other Config.pm settings" are automatically changed
appropriately for you.)
Cheers,
Rob