staltux
(usa Slackware)
Enviado em 21/02/2009 - 05:06h
eu estou tentando compilar uma classe, que nem usa namespace, e o compilador esta acusando erro de sintax no namespace que eu nao estou usando...
detalhe...eu ja tentei colocar explicitamente "using namespace std;"
mas nao adiantou...fora que eu nem sei oque é ou pra que serve esse namespace...nunca usei...
vai o erro completo:
#########################################
make all
Building file: ../src/animacao.cpp
Invoking: GCC C++ Compiler
g++ -O3 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/animacao.d" -MT"src/animacao.d" -o"src/animacao.o" "../src/animacao.cpp"
In file included from ../src/animacao.cpp:2:
../src/animacao.h:7:17: warning: SDL.h: No such file or directory
In file included from /usr/lib/gcc/i486-slackware-linux/4.2.4/../../../../include/c++/4.2.4/backward/iostream.h:31,
from ../src/animacao.cpp:3:
/usr/lib/gcc/i486-slackware-linux/4.2.4/../../../../include/c++/4.2.4/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
../src/animacao.cpp:58:2: warning: no newline at end of file
In file included from /usr/lib/gcc/i486-slackware-linux/4.2.4/../../../../include/c++/4.2.4/iostream:44,
from /usr/lib/gcc/i486-slackware-linux/4.2.4/../../../../include/c++/4.2.4/backward/iostream.h:32,
from ../src/animacao.cpp:3:
/usr/lib/gcc/i486-slackware-linux/4.2.4/../../../../include/c++/4.2.4/i486-slackware-linux/bits/c++config.h:149: error: expected unqualified-id before 'namespace'
../src/animacao.cpp: In constructor 'Animacao::Animacao(char)':
../src/animacao.cpp:27: warning: array subscript has type 'char'
../src/animacao.cpp:28: warning: array subscript has type 'char'
../src/animacao.cpp:23: warning: unused variable 'quadros'
../src/animacao.cpp:24: warning: unused variable 'fps'
../src/animacao.cpp: In member function 'void Animacao::addQuadro(SDL_Surface*, char)':
../src/animacao.cpp:44: warning: array subscript has type 'char'
../src/animacao.cpp:45: warning: array subscript has type 'char'
../src/animacao.cpp: In member function 'SDL_Surface* Animacao::getQuadro()':
../src/animacao.cpp:57: warning: array subscript has type 'char'
make: *** [src/animacao.o] Error 1
###################################################33
e como eu faço pra que a parte acima fique em destaque, amarelo como eu vejo em outros posts?