delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/12/28/19:34:44

From: "Marko Lokkila (Procyon)" <Procyon AT nic DOT NoSpam DOT fi>
Newsgroups: comp.os.msdos.djgpp
Subject: Problems while linking programs--
Lines: 39
X-Newsreader: Microsoft Outlook Express 4.72.3155.0
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0
Message-ID: <Fx7a4.470$eq.5577@uutiset.nic.fi>
Date: Tue, 28 Dec 1999 20:50:00 +0200
NNTP-Posting-Host: 212.38.225.52
X-Trace: uutiset.nic.fi 946406629 212.38.225.52 (Tue, 28 Dec 1999 20:43:49 EET)
NNTP-Posting-Date: Tue, 28 Dec 1999 20:43:49 EET
Organization: NIC Tietoverkot Oy - NIC Data Networks Ltd.
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Program source:

test.cpp------------

#include <iostream.h>

void main()
{
   cout<<"Hiya.";
   cin.get();
}

------------------------

When trying to make that to an .exe file, using the command

gcc test.cpp -o test.exe

I get the following errors:

f:/djgpp/tmp\ccdaaaaa(.text+0x11):testi.cpp: undefined reference to `cout'
f:/djgpp/tmp\ccdaaaaa(.text+0x16):testi.cpp: undefined reference to
`ostream::operator<<(char const *)'
f:/djgpp/tmp\ccdaaaaa(.text+0x20):testi.cpp: undefined reference to `cin'
f:/djgpp/tmp\ccdaaaaa(.text+0x25):testi.cpp: undefined reference to
`istream::get(void)'

Any help would be appreciated. There are no problems with compiling the
programs, they only arise when trying to build .exe files.


    ML -- AKA Procyon

--
Reality is that which, when you stop believing in it, doesn't go away.
                               Procyon AT nic DOT NoSpam DOT fi
         Merry Christmas to All and welcome to the new Millenium


- Raw text -


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