delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/03/14/21:55:21

Message-Id: <200103150255.VAA02248@delorie.com>
Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
X-Apparently-From: <commpg AT yahoo DOT com>
From: "Mark Paulus" <commpg AT yahoo DOT com>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Date: Wed, 14 Mar 2001 19:54:21 -0700
Reply-To: "Mark Paulus" <commpg AT yahoo DOT com>
X-Mailer: PMMail 2000 Professional (2.10.2010) For Windows 98 (4.90.3000)
MIME-Version: 1.0
Subject: Problem with make

I have noticed a problem with make.  Here goes:

I have a small program, hello.cc:

-------------------[ code ]-------------------------------------------
#include <iostream.h>
#include <stdio.h>

void main (void)
{
    cout << "Hello World!!" << endl;
}
-------------------[ end code ]-------------------------------------

Now, when I do a 'make hello', 
under debian everything works fine, and I get an
executable called hello. which I can run.
Under cygwin, I do not see the same behaviour.
Instead, what I see is:

gcc     hello.cc   -o hello
/cygdrive/c/WINDOWS/TEMP/ccYbTAo7.o(.text+0x1f):hello.cc: undefined reference to
 `endl(ostream &)'
/cygdrive/c/WINDOWS/TEMP/ccYbTAo7.o(.text+0x2c):hello.cc: undefined reference to
 `cout'
/cygdrive/c/WINDOWS/TEMP/ccYbTAo7.o(.text+0x31):hello.cc: undefined reference to
 `ostream::operator<<(char const *)'
collect2: ld returned 1 exit status
make: *** [hello] Error 1

After further investigation, what is going on is that under linux, make is calling g++ by default
for files with a .cc extension, but under cygwin, make is calling gcc by default.  Does anyone 
know what the rationale is for this "exceptional" behaviour under cygwin??



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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