delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/13/12:01:35

From: crazor AT mail DOT execpc DOT com
Newsgroups: comp.os.msdos.djgpp
Subject: Link the object files
Date: Fri, 13 Mar 1998 10:41:48 -0600
Organization: Deja News - The Leader in Internet Discussion
Lines: 19
Message-ID: <6ebnho$ir$1@nnrp1.dejanews.com>
NNTP-Posting-Host: 169.207.108.176
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hi, I use gcc -o exe_file obj_file.o
to link the object file, but I got error like this

hello.o(.text+0x14):hello.cpp:undefined reference to 'endl(ostream&)'
hello.o(.text+0x1e):hello.cpp:undefined reference to 'cout'
hello.o(.text+0x23):hello.cpp:undefined reference to 'ostream::operator<<(char
const *)'

My c++ code is simple like this
#include <iostream.h>

void main(void) {
  cout << "hello...test" << endl;
}



-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading

- Raw text -


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