[perl] Portably linking to libstdc++

Sisyphus sisyphus1@optusnet.com.au
Sun Oct 19 12:49:00 GMT 2008


----- Original Message ----- 
From: "Sisyphus" <sisyphus1@optusnet.com.au>
.
.
>
> How do I write that LIBS assignment so that it would be portable across 
> different *Cygwin* installations ?
>

I still don't know how to do that - though I did come to a better 
understanding of how the problem arises.

For both linux and cygwin, 'perl -V:libpth' returns 'libpth='/usr/local/lib 
/usr/lib /lib'.

On linux I can run 'perl Makefile.PL LIBS="-lstdc++"' and that runs fine 
because '-lstdc++' is found in $Config{libpth}, in the form of libstdc++.so.

But on cygwin, there is no '-lstdc++' to be found in $Config{libpth}, so 
MakeMaker decides to not pass the switch on (which has always been 
MakeMaker's policy in such cases, afaik). This is a pity - there would be no 
problem if it *did* the pass switch on, as both gcc and g++ on cygwin will 
resolve that link.

IMO, on my cygwin perl, $Config{libpth} should be set to '/usr/local/lib 
/usr/lib /lib /lib/gcc/i686-pc-cygwin/3.4.4', and I regard it as a bug that 
'/lib/gcc/i686-pc-cygwin/3.4.4' is not being included in $Config{libpth}. In 
fact, I've modified the libpth setting in Config.pm to '/usr/local/lib 
/usr/lib /lib /lib/gcc/i686-pc-cygwin/3.4.4'.

Is there somewhere I should lodge a bug report about this ?

Cheers,
Rob 


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list