delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/09/05/16:17:18

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-Id: <4.3.1.2.20020905084711.022ce248@pop.rcn.com>
X-Sender: lhall AT pop DOT rcn DOT com
Date: Thu, 05 Sep 2002 08:49:38 -0400
To: LEE LIK CHUAN <superbshot AT yahoo DOT com>, cygwin AT cygwin DOT com
From: "Larry Hall (RFK Partners, Inc)" <lhall AT rfk DOT com>
Subject: Re: Problem with ld on cygwin
In-Reply-To: <20020905094938.8446.qmail@web10708.mail.yahoo.com>
Mime-Version: 1.0

At 05:49 AM 9/5/2002, LEE LIK CHUAN wrote:
>Hi
>
>I have download cgywin and installed on my computer.
>However when i try to build a program by the command:
>
>ld test.o
>
>i got the following msg:
>
>ld: warning: cannot find entry symbol _mainCRTStartup;
>defaulting to 00401000
>test.o(.text+0xb):test.cpp: undefined reference to
>`__main'
>test.o(.text+0x13):test.cpp: undefined reference to
>`endl(ostream &)'
>test.o(.text+0x20):test.cpp: undefined reference to
>`cout'
>test.o(.text+0x25):test.cpp: undefined reference to
>`ostream::operator<<(char co
>nst *)'
>
>Can anyone help?


Actually, the email archives can help with a problem like
this.  It's asked incessantly so there are lots of reference
points! ;-)  

This is not a Cygwin issue.  It's a gcc issue.  You're compiling
C++ code with gcc.  Don't.  Use g++ instead.



Larry Hall                              lhall AT rfk DOT com
RFK Partners, Inc.                      http://www.rfk.com
838 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019