X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL,TW_YG,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Message-ID: <4FD22835.1000301@cs.utoronto.ca> Date: Fri, 08 Jun 2012 12:28:37 -0400 From: Ryan Johnson User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: i686-pc-mingw32-gcc 4.5.2 and static linking libstdc++-6? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 On 08/06/2012 10:55 AM, Dennis Isenhour wrote: > On 2012-06-01 22:40, Greg Chicares wrote: > What if you use i686-pc-mingw32-g++ instead of i686-pc-mingw32-gcc? > > I've tried that (so i'm no longer receiving the "unrecognized option" > warning message), but I must still be doing something wrong as I'm > still having the same problem. It doesn't appear to actually be > linking the library statically as cygcheck still gives me the same > error: > cygcheck: track_down: could not find libstdc++-6.dll Passing appropriate -static-* options to g++ solves it for me, though strangely enough I can't find the corresponding .a files either: $ cat scratch.cpp #include #include int main() { std::string s = "hi"; std::cout << s << std::endl; } $ i686-pc-mingw32-g++ scratch.cpp && cygcheck ./a >/dev/null && ./a cygcheck: track_down: could not find libgcc_s_dw2-1.dll cygcheck: track_down: could not find libstdc++-6.dll $ i686-pc-mingw32-g++ -static-libgcc -static-libstdc++ scratch.cpp && cygcheck ./a >/dev/null && ./a hi $ cygcheck -dc | grep mingw mingw-binutils 2.21-1 mingw-gcc-core 4.5.2-1 mingw-gcc-g++ 4.5.2-1 mingw-pthreads 20110507-1 mingw-runtime 3.20-1 mingw-w32api 3.17-2 Ryan -- 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