delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/09/27/02:58:24

From: cgg AT mundil DOT cs DOT mu DOT OZ DOT AU (Christopher Geoffrey GRINTON)
Subject: Troubles linking when using iomanip.h
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Date: Tue, 27 Sep 1994 13:28:00 +1000 (EST)

I'm having some trouble during linking when I try to use things from iomanip.h.
I have this little test file:

#include <iostream.h>
#include <iomanip.h>

int main()
{
	cout << '|' << setw(5) << 245 << '|' << endl;
	return 0;
}

When I compile with gcc -Wall -o test test.cc -lgpp, I get the output

test.cc(.text+0x42): undefined reference to `operator<<(ostream &, smanip<int> c
onst &)'

Am I missing some library, or is something else going on?

One other little point.  Compiling a file using the _string.h header file in
cplusinc/ with -Wall gives zillions of warnings.  I've fixed it by just putting
`inline' in front of all the function declarations from line 400--446, but it
seems a bit strange...?

Regards
Chris



- Raw text -


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