From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21728 invoked by alias); 10 Nov 2011 21:25:31 -0000 Received: (qmail 21715 invoked by uid 22791); 10 Nov 2011 21:25:30 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from lo.gmane.org (HELO lo.gmane.org) (80.91.229.12) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 10 Nov 2011 21:25:18 +0000 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1ROc7U-0004Jl-Cg for cygwin@cygwin.com; Thu, 10 Nov 2011 22:25:12 +0100 Received: from p4fc60e9d.dip0.t-ipconnect.de ([79.198.14.157]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 10 Nov 2011 22:25:12 +0100 Received: from philipp.kraus by p4fc60e9d.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 10 Nov 2011 22:25:12 +0100 To: cygwin@cygwin.com From: Philipp Kraus Subject: Re: linker error libcygwin Date: Thu, 10 Nov 2011 21:25:00 -0000 Message-ID: References: <8DB56F04-18E5-43C3-8080-05565BA1531D@flashpixx.de> <4EBC3E14.9060000@sbcglobal.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8bit User-Agent: Unison/2.1.5 X-IsSubscribed: yes 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: 2011-11/txt/msg00197.txt.bz2 On 2011-11-10 22:11:48 +0100, Greg Chicares said: > On 2011-11-10 20:39Z, Kraus Philipp wrote: >> >> I try to build a program with g++ under Cygwin. I added this libraries >> to the linker: >> -lcygboost_system > > Shouldn't that be '-lboost_system'? Run 'info ld' and search for > '--dll-search-prefix': 'cyg-' is a typical default prefix that > the '-l' option should recognize without your specifying it. okay, thanks for this hint > >> /usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../libcygwin.a(libcmain.o):(.text+0xa9): >> >> undefined reference to `_WinMain@16' >> collect2: ld returned 1 exit status > > Does this thread > http://cygwin.com/ml/cygwin/2011-10/threads.html#00440 > contain the answer? no, sorry. > If this is a console application, does it have > an implementation of main()? yes the signature of the main is in this example: int main(int argc, char* argv[]) > Or if it's a windows GUI application, > is WinMain() implemented in some object file passed to the linker? No i don't use the WinMain() and I call the compiler / linker with -mconsole but on 3 examples the error with the WinMain is shown, on other examples everything works fine, so I don't understand it Thanks Phil -- 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