Menu

#1 Can't compile : error: ‘cerr’ was not declared in this scope

open
nobody
None
5
2014-11-26
2009-12-08
Zurd
No

On Ubuntu 9.10, I install build-essential to have g++, I run make and it displays :
(duplicated lines not shown, about 200 of them!)

g++ -O2 -I/usr/X11R6/include -Wall -pedantic -DVERSION=0.3 xmacroplay.cpp -o xmacroplay -L/usr/X11R6/lib -lXtst -lX11
xmacroplay.cpp:57:22: error: iostream.h: No such file or directory
xmacroplay.cpp:58:21: error: iomanip.h: No such file or directory
In file included from xmacroplay.cpp:49:
chartbl.h:283: warning: deprecated conversion from string constant to ‘char*’
chartbl.h:543: warning: deprecated conversion from string constant to ‘char*’
chartbl.h:543: warning: deprecated conversion from string constant to ‘char*’
xmacroplay.cpp: In function ‘void usage(int)’:
xmacroplay.cpp:91: error: ‘cerr’ was not declared in this scope
xmacroplay.cpp:91: error: ‘endl’ was not declared in this scope
xmacroplay.cpp: In function ‘void version()’:
xmacroplay.cpp:113: error: ‘cerr’ was not declared in this scope
xmacroplay.cpp:113: error: ‘endl’ was not declared in this scope
xmacroplay.cpp: In function ‘void parseCommandLine(int, char**)’:
xmacroplay.cpp:160: error: ‘cerr’ was not declared in this scope
xmacroplay.cpp:160: error: ‘endl’ was not declared in this scope
xmacroplay.cpp:173: error: ‘cerr’ was not declared in this scope
xmacroplay.cpp:173: error: ‘endl’ was not declared in this scope
xmacroplay.cpp:188: error: ‘cerr’ was not declared in this scope
xmacroplay.cpp:188: error: ‘endl’ was not declared in this scope
xmacroplay.cpp: In function ‘Display* remoteDisplay(const char*)’:
xmacroplay.cpp:215: error: ‘cerr’ was not declared in this scope
xmacroplay.cpp:216: error: ‘endl’ was not declared in this scope
xmacroplay.cpp:223: error: ‘cerr’ was not declared in this scope
xmacroplay.cpp:224: error: ‘endl’ was not declared in this scope
xmacroplay.cpp:232: error: ‘cerr’ was not declared in this scope
xmacroplay.cpp:233: error: ‘endl’ was not declared in this scope
xmacroplay.cpp: In function ‘void sendChar(Display*, char)’:
xmacroplay.cpp:280: error: ‘cerr’ was not declared in this scope
xmacroplay.cpp:280: error: ‘endl’ was not declared in this scope
xmacroplay.cpp:285: error: ‘cerr’ was not declared in this scope
xmacroplay.cpp:285: error: ‘endl’ was not declared in this scope
xmacroplay.cpp:292: error: ‘cerr’ was not declared in this scope
xmacroplay.cpp:292: error: ‘endl’ was not declared in this scope
xmacroplay.cpp:298: error: ‘cerr’ was not declared in this scope
xmacroplay.cpp:298: error: ‘endl’ was not declared in this scope
xmacroplay.cpp: In function ‘void eventLoop(Display*, int)’:
xmacroplay.cpp:336: error: ‘cin’ was not declared in this scope
xmacroplay.cpp:340: error: ‘cout’ was not declared in this scope
xmacroplay.cpp:340: error: ‘endl’ was not declared in this scope
xmacroplay.cpp:346: error: ‘cout’ was not declared in this scope
xmacroplay.cpp:346: error: ‘endl’ was not declared in this scope
xmacroplay.cpp:352: error: ‘cout’ was not declared in this scope
xmacroplay.cpp:352: error: ‘endl’ was not declared in this scope
xmacroplay.cpp:358: error: ‘cout’ was not declared in this scope
xmacroplay.cpp:358: error: ‘endl’ was not declared in this scope
xmacroplay.cpp:364: error: ‘cout’ was not declared in this scope
xmacroplay.cpp:364: error: ‘endl’ was not declared in this scope
xmacroplay.cpp:370: error: ‘cout’ was not declared in this scope
xmacroplay.cpp:370: error: ‘endl’ was not declared in this scope
xmacroplay.cpp:376: error: ‘cout’ was not declared in this scope
xmacroplay.cpp:376: error: ‘endl’ was not declared in this scope
xmacroplay.cpp:382: error: ‘cout’ was not declared in this scope
xmacroplay.cpp:382: error: ‘endl’ was not declared in this scope
xmacroplay.cpp:385: error: ‘cerr’ was not declared in this scope
xmacroplay.cpp:395: error: ‘cout’ was not declared in this scope
xmacroplay.cpp:395: error: ‘endl’ was not declared in this scope
xmacroplay.cpp:398: error: ‘cerr’ was not declared in this scope
xmacroplay.cpp:406: error: ‘cout’ was not declared in this scope
xmacroplay.cpp:406: error: ‘endl’ was not declared in this scope
xmacroplay.cpp:409: error: ‘cerr’ was not declared in this scope
xmacroplay.cpp:417: error: ‘cout’ was not declared in this scope
xmacroplay.cpp:417: error: ‘endl’ was not declared in this scope
xmacroplay.cpp:421: error: ‘cerr’ was not declared in this scope
xmacroplay.cpp:431: error: ‘cout’ was not declared in this scope
xmacroplay.cpp:431: error: ‘endl’ was not declared in this scope
xmacroplay.cpp:435: error: ‘cerr’ was not declared in this scope
xmacroplay.cpp:443: error: ‘cout’ was not declared in this scope
xmacroplay.cpp:443: error: ‘endl’ was not declared in this scope
xmacroplay.cpp:447: error: ‘cerr’ was not declared in this scope
xmacroplay.cpp:455: error: ‘cout’ was not declared in this scope
xmacroplay.cpp:455: error: ‘endl’ was not declared in this scope
xmacroplay.cpp:459: error: ‘cout’ was not declared in this scope
xmacroplay.cpp:459: error: ‘endl’ was not declared in this scope
xmacroplay.cpp: In function ‘int main(int, char**)’:
xmacroplay.cpp:497: error: ‘cerr’ was not declared in this scope
xmacroplay.cpp:497: error: ‘endl’ was not declared in this scope
make: *** [xmacroplay] Error 1

Discussion


Log in to post a comment.

MongoDB Logo MongoDB