in reply to How to make an XS module with a different C compiler?

If your Perl was built with gcc then you almost certainly want to use gcc to compile the extension, the dynamic libraries (.so files) should work anyway but there will be a strong chance the different compilers will have different symbols and use a different C Runtime library - this can cause problems when building extensions even with different versions of the same compiler (see for example http://www.mail-archive.com/perl5-porters@perl.org/msg84195.html. I would recommend trying to get this work with gcc (does make test give any errors?) and only then attempt to use a different compiler.

/J\

Replies are listed 'Best First'.
Re^2: How to make an XS module with a different C compiler?
by mifflin (Curate) on Jan 18, 2005 at 18:24 UTC

    Do you see any gotchas if I decided to rebuild my current Perl installtion with the Sun Studio 8 compiler?

    Would I then have problems adding other XS modules like DBI, DBD::Oracle, XML::Parser ...?

      In general no, I think you should be alright using the Sun compiler. If you have a number of modules already installed you might want to run cpan autobundle before you trash your old Perl.

      /J\