delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/10/16/02:40:41

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <586E6C4720134D06B35A67112D3BBBCE@desktop2>
From: "Sisyphus" <sisyphus1 AT optusnet DOT com DOT au>
To: <cygwin AT cygwin DOT com>
Subject: [perl] Portably linking to libstdc++
Date: Thu, 16 Oct 2008 17:38:54 +1100
MIME-Version: 1.0
X-Mailer: Microsoft Windows Mail 6.0.6001.18000
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Hi,

On linux, I can have my perl distro link to libstdc++ by simply specifying 
(in the Makefile.PL's %WriteMakefile) :

  LIBS => ['-lstdc++'],

And, for MinGW-built perls on Win32, the same construct works.
For Cygwin, it seems that is not sufficient (as the directory that houses 
libstdc++.a is apparently not searched by default). Instead, Cygwin needs 
something like:

  LIBS => ['-L/lib/gcc/i686-pc-cygwin/3.4.4 -lstdc++'],

But that doesn't look very portable across different Cygwin installations. 
(I'm looking mainly at the '3.4.4', and thinking that not every Cygwin 
installation will have such a directory.)

How do I write that LIBS assignment so that it would be portable across 
different *Cygwin* installations ?

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019