delorie.com/archives/browse.cgi | search |
Message-ID: | <01BFC526.FE13C1C0@mdm122.plug-in.com.br> |
From: | Marcelo Juchem <mj-me AT plug-in DOT com DOT br> |
To: | "'djgpp AT delorie DOT com'" <djgpp AT delorie DOT com> |
Subject: | HELP WITH C++ COMPILING: UNDEFINED REFERENCE appears when using functions from IOSTREAM.H |
Date: | Wed, 24 May 2000 02:22:43 -0300 |
MIME-Version: | 1.0 |
X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id BAA27330 |
Reply-To: | djgpp AT delorie DOT com |
I tried to compile the following code: #include <iostream.h> void main() { cout << "\nPLEASE, WORK DAMNIT!!!\n"; } With the following command-lines: gcc hiworld.cpp gcc -lstdcxx hiworld.cpp gcc -lstdcxx -o2 hiworld.cpp gcc -lstdcxx -lgpp hiworld.cpp gcc -lstdcxx -lgpp -o2 hiworld.cpp But it didn't worked at all. I tried everything that's in the FAQs and other stuff. All my enviroment files/variables/.../setup/installation are ok. The following output is generated from gcc: d:/djgpp/tmp\cckLVI2c.o(.text+0x1b):hiworld.cpp: undefined reference to 'cout' d:/djgpp/tmp\cckLVI2c.o(.text+0x1b):hiworld.cpp: undefined reference to 'ostream::operator<<(char const *)' collect2: ld returned 1 exit status How should I fix this problem? Marcelo Juchem, mj-me AT plug-in DOT com DOT br 00106983 AT paris DOT inf DOT pucrs DOT br
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |