[perl] Portably linking to libstdc++
Mon Oct 20 13:08:00 GMT 2008
> Apparently g++ needs a "-shared" but ld2 doesn't. (I don't understand that.)
> And I don't understand what is achieved by:
> gcc -shared -o
> Size.dll -Wl,--out-implib=libSize.dll.a -Wl,--export-all-symbols -Wl,--enable-auto-import
> -Wl,--stack,8388608 -Wl,--enable-auto-image-base \
> -s -L/usr/local/lib Size.o /usr/lib/perl5/5.8/cygwin/CORE/libperl.dll.a
> That command gets run only if LD is ld2 - there doesn't seem to be a
> comparable command if LD is set to either "g++" or "g++ -shared".
/usr/bin/ld2 is a wrapper script that calls /usr/bin/perlld which is
another wrapper script that adds all those extra parameters if it
detects that a library is being linked. So yet another workaround would
be to edit perlld and change "my $CC = 'gcc'" to g++.
Maybe you should try the current perl 5.10 where all these crufty
wrapper scripts are gone and it should work without any hacks.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
More information about the Cygwin