This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Problem with make
- To: "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Subject: Problem with make
- From: "Mark Paulus" <commpg at yahoo dot com>
- Date: Wed, 14 Mar 2001 19:54:21 -0700
- Reply-To: "Mark Paulus" <commpg at yahoo dot com>
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