| delorie.com/archives/browse.cgi | search |
| 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 |
| Message-ID: | <001201c0940b$08c8c3a0$ac07f8d4@1> |
| From: | "Anton Mochalin" <bloomdido AT mtu-net DOT ru> |
| To: | <cygwin AT cygwin DOT com> |
| Subject: | Trying to compile a simple C++ program |
| Date: | Sun, 11 Feb 2001 12:13:11 +0300 |
| MIME-Version: | 1.0 |
| X-Priority: | 3 |
| X-MSMail-Priority: | Normal |
| X-Mailer: | Microsoft Outlook Express 4.72.3110.5 |
| X-MimeOLE: | Produced By Microsoft MimeOLE V4.72.3110.3 |
Hello.
I typed a simple program into a file 'a.cpp':
#include <iostream.h>
main()
{
cout << "Hi!";
}
and then tried to compile it:
$ gcc -o a.exe a.cpp
All I got is:
/c/WINDOWS/TEMP/ccnLFh81.o(.text+0x18):a.cpp: undefined reference to `cout'
/c/WINDOWS/TEMP/ccnLFh81.o(.text+0x1d):a.cpp: undefined reference to
`ostream::operator<<(char const *)'
collect2: ld returned 1 exit status
What's wrong? It seems that maybe something is wrong with the header files
(iostream.h maybe) but what should I do to make gcc compile this program?
My cygwin version is 1.1.8-2 and gcc version is 2.95.2-7
Anton.
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |