Xref: news-dnh.mv.net comp.os.msdos.djgpp:1351 Newsgroups: comp.os.msdos.djgpp Path: news-dnh.mv.net!mv!news.sprintlink.net!howland.reston.ans.net!EU.net!uknet!newsfeed.ed.ac.uk!hwcee!pjbk From: pjbk AT cee DOT hw DOT ac DOT uk (Peter JB King) Subject: What have I done wrong with g++ Sender: news AT cee DOT hw DOT ac DOT uk (News Administrator) Organization: Dept of Computing & Electrical Engineering, Heriot-Watt University, Scotland Date: Thu, 3 Aug 1995 15:26:07 GMT Lines: 48 To: djgpp AT sun DOT soe DOT clarkson DOT edu Dj-Gateway: from newsgroup comp.os.msdos.djgpp I have installed djgpp 1.12m4 (and am an experienced C programmer using it). I decided to try out C++, since we are going to be using it to teach students next year. I seem to have immediate problems as soon as I use manipulators in the output stream. I would have thought that I have done something gross as pat of the installation, but I can't think what! Could some kind reader enlighten me? The failing program and teh compiler output when using gcc -v is appended. // failure of setw in the output stream #include #include main() { int j = 735; cout << j << setw(4) < search starts here: c:/gcc/cplusinc c:/gcc/include /usr/local/lib/g++-include /usr/local/include /usr/local/go32/include /usr/local/lib/gcc-lib/go32/2.6.0/include /usr/include End of search list. c:/gcc/bin/cc1plus.exe c:/gcc/tmp/cc020392 -quiet -dumpbase t1.cc -version -o c:/gcc/tmp/cca20392 GNU C++ version 2.6.0 (80386, BSD syntax) compiled by GNU C version 2.6.0. t1.cc: In function `int main()': t1.cc:22: warning: assignment to `int' from `float' c:/gcc/bin/as.exe -o c:/gcc/tmp/ccb20392 c:/gcc/tmp/cca20392 c:/gcc/bin/ld.exe -o t1 c:/gcc/lib/crt0.o -Lc:/gcc/lib c:/gcc/tmp/ccb20392 -lgpp -lgcc -lc -lgcc t1.cc(.text+0x11d): undefined reference to `operator<<(ostream &, smanip const &)' -- Peter King, Computing & Electrical Eng. Internet: pjbk AT cee DOT hw DOT ac DOT uk Heriot-Watt University, Riccarton, Edinburgh EH14 4AS Phone: (+44) 131 451 3433 Fax: (+44) 131 451 3431