Xref: news2.mv.net comp.os.msdos.djgpp:4688 From: Enrico Horn Newsgroups: comp.os.msdos.djgpp Subject: Re: Troubles with C++ compiling. Date: Fri, 07 Jun 1996 09:09:51 +0200 Organization: Technische Universitaet Ilmenau Lines: 34 Message-ID: <31B7D5BF.4C4A@prakinf.tu-ilmenau.de> References: NNTP-Posting-Host: ipisparc4.prakinf.tu-ilmenau.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Glenn Euloth DJ-Gateway: from newsgroup comp.os.msdos.djgpp Glenn Euloth wrote: > I have just downloaded the C++ compiler in an effort to teach > myself some C++. (...)I keyed in a sample C++ program (from a text book); > here's the source: > ======================================================== > #include (...) > I get the following results: > ========================================================== > test.cc(.text+0x3d): undefined reference to `cout' ==CUTTED== (following just more undefined references) It seems like there is a library missing! Did you compile it with the -liostr switch (hope this is the right syntax)? If not, do it! This will link the C++ iostream library, which is not automatically linked (as far as I know). A little hint: if you get undefinded references in your program, there is often a library or object file missing!! So look what library you did forget or what object file you did forget to add to your command line !! Hope you have success. Regards, Enrico. -- /---------------------------------------------------------------------\ |Enrico Horn Tel. 036738/41929 | |07426 Lichta E-mail: enrico DOT horn AT prakinf DOT tu-ilmenau DOT de | |Ortsstrasse Nr. 14 http://www.prakinf.tu-ilmenau.de/~ehorn | \---------------------------------------------------------------------/