X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: <48FC8298.9BC00943@dessent.net> Date: Mon, 20 Oct 2008 06:07:36 -0700 From: Brian Dessent X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: [perl] Portably linking to libstdc++ References: <586E6C4720134D06B35A67112D3BBBCE AT desktop2> <48FB462B DOT 4B75336B AT dessent DOT net> <48FC5562 DOT 1DDA1FAE AT dessent DOT net> <362AEC237F86449F9A0FDD5F0198E068 AT desktop2> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Sisyphus wrote: > 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. Brian -- 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/