From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18468 invoked by alias); 23 Oct 2011 18:22:59 -0000 Received: (qmail 18453 invoked by uid 22791); 23 Oct 2011 18:22:58 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-qy0-f171.google.com (HELO mail-qy0-f171.google.com) (209.85.216.171) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 23 Oct 2011 18:22:44 +0000 Received: by qyk33 with SMTP id 33so1763830qyk.2 for ; Sun, 23 Oct 2011 11:22:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.59.146 with SMTP id l18mr284022qch.260.1319394163526; Sun, 23 Oct 2011 11:22:43 -0700 (PDT) Received: by 10.229.29.143 with HTTP; Sun, 23 Oct 2011 11:22:43 -0700 (PDT) In-Reply-To: References: Date: Sun, 23 Oct 2011 18:22:00 -0000 Message-ID: Subject: Re: g++ linker problem with libcygwin.a From: Csaba Raduly To: cygwin@cygwin.com Content-Type: text/plain; charset=ISO-8859-1 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-10/txt/msg00471.txt.bz2 On Sat, Oct 22, 2011 at 9:18 PM, Philipp Kraus wrote: > Hello, > > I use Cygwin with g++ for compiling my source codes and on some codes I get > the error: > > /usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../libcygwin.a(libcmain.o):(.text+0xa9): > undefined reference to `_WinMain@16' If there is no main(), libcygwin.a gives you a last chance: maybe there is a WinMain function defined in your code, which will be called by libc to start the program. (or something like that) Csaba -- GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++ The Tao of math: The numbers you can count are not the real numbers. Life is complex, with real and imaginary parts. "Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds "People disagree with me. I just ignore them." -- Linus Torvalds -- 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