X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=0.6 required=5.0 tests=AWL,BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org X-Yahoo-SMTP: mjD.OBqswBAPbVUxYJaYPvc61jLEnpq8VnBwJGdbEJOPA9xw Message-ID: <4EBC3E14.9060000@sbcglobal.net> Date: Thu, 10 Nov 2011 21:11:48 +0000 From: Greg Chicares User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: linker error libcygwin References: <8DB56F04-18E5-43C3-8080-05565BA1531D AT flashpixx DOT de> In-Reply-To: <8DB56F04-18E5-43C3-8080-05565BA1531D@flashpixx.de> Content-Type: text/plain; charset=ISO-8859-1 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 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. > /usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../libcygwin.a(libcmain.o):(.text+0xa9): > undefined reference to `_WinMain AT 16' > collect2: ld returned 1 exit status Does this thread http://cygwin.com/ml/cygwin/2011-10/threads.html#00440 contain the answer? If this is a console application, does it have an implementation of main()? Or if it's a windows GUI application, is WinMain() implemented in some object file passed to the linker? -- 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