From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25919 invoked by alias); 1 Jun 2012 17:29:35 -0000 Received: (qmail 25906 invoked by uid 22791); 1 Jun 2012 17:29:34 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-wi0-f173.google.com (HELO mail-wi0-f173.google.com) (209.85.212.173) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 01 Jun 2012 17:29:21 +0000 Received: by wibhj6 with SMTP id hj6so658621wib.2 for ; Fri, 01 Jun 2012 10:29:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.196.218 with SMTP id r68mr2625089wen.122.1338571760305; Fri, 01 Jun 2012 10:29:20 -0700 (PDT) Received: by 10.216.121.20 with HTTP; Fri, 1 Jun 2012 10:29:20 -0700 (PDT) Date: Fri, 01 Jun 2012 17:29:00 -0000 Message-ID: Subject: i686-pc-mingw32-gcc 4.5.2 and static linking libstdc++-6? From: Dennis Isenhour To: cygwin@cygwin.com Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2012-06/txt/msg00022.txt.bz2 Can someone tell me, is static linking of libstdc++(-6 ?) not currently supported in cygwin using the mingw compiler? On Thu, May 31, 2012 at 1:55 PM, Dennis Isenhour wrote: > Please excuse me if this isn=92t the correct place for this question or > if I=92ve misunderstood something, or am not understanding something > obvious, but I honestly wasn=92t really sure where the best place to ask > was despite looking around for quite some time and I have been unable > to locate anything that directly answers my questions in any of the > forums (on both the=A0cygwin.com and mingw.org sites). > > I am in the process of switching from an older version of cygwin gcc > where I previously used the =96mno-cygwin flag in order to utilize the > mingw compiler portion.=A0 With the new latest version, it appears I > need to change to explicitly install and utilize the mingw compiler. > After making the change, I have now encountered a situation where my > compiled executable is no longer working/loading correctly.=A0 Debugging > the problem using the =93cygcheck=94 tool, I was able to determine that > the object was failing because it could not locate =93libstdc++-6.dll=94. > > cygcheck: track_down: could not find libstdc++-6.dll > > I thus located ./gcc/i686-pc-mingw32/4.5.2/debug/libstdc++-6.dll and > copied it to my local build area, which ultimately did in fact resolve > my issue.=A0 However, I would prefer NOT to have to distribute this dll > with my executables and so I am thus now attempting to figure out how > I can go about linking this new, apparently required library, > statically, however I can=92t seem to locate libstdc++-6.a or > libstdc++-6.so anywhere in my cygwin repository. =A0I've been trying to > make use of '-static-libstdc++' option, however I see that it keeps > telling me that it is not recognized: > > i686-pc-mingw32-gcc: unrecognized option '-static-libstdc++' > > I'm also not real sure what the difference is between libstdc++-6 and > libstdc++, so I'm not positive -static-libstdc++ would be the correct > solution either, even if I could get that to work. > > Anyone who can provide me with any further insight or useful > information would be greatly appreciated! > > Thanks in advance. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple