This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Compile Error - Upgrading gcc version
- From: "Luis Molina" <lufemo at gmail dot com>
- To: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Mon, 30 Jun 2008 15:43:18 -0600
- Subject: Compile Error - Upgrading gcc version
Hello!
I'm having troubles with an application.
We have this...
A Suse 6.1 machine that has the original application ... It runs ok, I
can compile the code without troubles...
gcc -v
Reading specs from /usr/lib/gcc-lib/i486-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)
Now we need to make the code compile in this Suse 8 machine
gcc -v
Reading specs from /usr/lib/gcc-lib/i486-suse-linux/3.3/specs
Configured with: ../configure --enable-threads=posix --prefix=/usr
--with-local-prefix=/usr/local --infodir=/usr/share/info
--mandir=/usr/share/man --libdir=/usr/lib
--enable-languages=c,c++,f77,objc,java,ada --disable-checking
--enable-libgcj --with-gxx-include-dir=/usr/include/g++
--with-slibdir=/lib --with-system-zlib --enable-shared
--enable-__cxa_atexit i486-suse-linux
Thread model: posix
gcc version 3.3 20030226 (prerelease) (SuSE Linux)
But at the time that I use this....
cc -static Calendario.cpp -o Calendario central.cpp \
alcatel.cpp sca00p.cpp sca10p.cpp
It throws lots of errors... :S
Some of this can be corrected by changing things in the source code,
but I'm afraid that some change makes the application useless.
In file included from Calendario.cpp:23:
central.h:72: error: ISO C++ forbids declaration of `setNombreBitacora' with no
type
central.h:73: error: ISO C++ forbids declaration of `obtenerNombreBitacora'
with no type
central.h:74: error: ISO C++ forbids declaration of `escribirEnBitacora' with
no type
central.h:75: error: ISO C++ forbids declaration of `CerrarBitacora' with no
type
central.h:76: error: ISO C++ forbids declaration of `AbrirBitacora' with no
type
central.h:77: error: ISO C++ forbids declaration of `AnotarUsuario' with no
type
central.h:78: error: ISO C++ forbids declaration of `PuertoEnFalla' with no
type
In file included from Calendario.cpp:23:
central.h:81:8: warning: extra tokens at end of #endif directive
In file included from Calendario.cpp:24:
alcatel.h:20: error: ISO C++ forbids declaration of `PROMPT' with no type
alcatel.h:22: error: ISO C++ forbids declaration of `Comando' with no type
Calendario.cpp: In function `int CapturarMes()':
Calendario.cpp:780: warning: address of local variable `valort' returned
In file included from central.cpp:20:
central.h:72: error: ISO C++ forbids declaration of `setNombreBitacora' with no
type
central.h:73: error: ISO C++ forbids declaration of `obtenerNombreBitacora'
with no type
central.h:74: error: ISO C++ forbids declaration of `escribirEnBitacora' with
no type
central.h:75: error: ISO C++ forbids declaration of `CerrarBitacora' with no
type
central.h:76: error: ISO C++ forbids declaration of `AbrirBitacora' with no
type
central.h:77: error: ISO C++ forbids declaration of `AnotarUsuario' with no
type
central.h:78: error: ISO C++ forbids declaration of `PuertoEnFalla' with no
type
In file included from central.cpp:20:
central.h:81:8: warning: extra tokens at end of #endif directive
central.cpp:46: error: default argument given for parameter 3 of `int
sca_serial::ConfigPort(long int, char*, int = 0)'
central.h:38: error: after previous specification in `int
sca_serial::ConfigPort(long int, char*, int = 0)'
central.cpp:290: error: ISO C++ forbids declaration of `escribirEnBitacora'
with no type
central.cpp:409: error: ISO C++ forbids declaration of `obtenerNombreBitacora'
with no type
central.cpp:412: error: ISO C++ forbids declaration of `CerrarBitacora' with no
type
central.cpp:415: error: ISO C++ forbids declaration of `AbrirBitacora' with no
type
central.cpp:422: error: ISO C++ forbids declaration of `PuertoEnFalla' with no
type
In file included from alcatel.cpp:17:
central.h:72: error: ISO C++ forbids declaration of `setNombreBitacora' with no
type
central.h:73: error: ISO C++ forbids declaration of `obtenerNombreBitacora'
with no type
central.h:74: error: ISO C++ forbids declaration of `escribirEnBitacora' with
no type
central.h:75: error: ISO C++ forbids declaration of `CerrarBitacora' with no
type
central.h:76: error: ISO C++ forbids declaration of `AbrirBitacora' with no
type
central.h:77: error: ISO C++ forbids declaration of `AnotarUsuario' with no
type
central.h:78: error: ISO C++ forbids declaration of `PuertoEnFalla' with no
type
In file included from alcatel.cpp:17:
central.h:81:8: warning: extra tokens at end of #endif directive
In file included from alcatel.cpp:18:
alcatel.h:20: error: ISO C++ forbids declaration of `PROMPT' with no type
alcatel.h:22: error: ISO C++ forbids declaration of `Comando' with no type
alcatel.cpp:35: error: ISO C++ forbids declaration of `Comando' with no type
alcatel.cpp:115: error: ISO C++ forbids declaration of `PROMPT' with no type
sca10p.cpp: In member function `int PUERTOS_10C::Salvar(FPUERTOS_10S*)':
sca10p.cpp:495: error: cannot convert `fpos_t' to `long int' for argument `2'
to `int fseek(FILE*, long int, int)'
sca10p.cpp: In member function `int PUERTOS_10C::Desbloquear()':
sca10p.cpp:559: error: no match for `fpos_t& = long int' operator
/usr/include/_G_config.h:27: error: candidates are: _G_fpos_t&
_G_fpos_t::operator=(const _G_fpos_t&)
sca10p.cpp:566: error: no match for `fpos_t& += unsigned int' operator
sca10p.cpp:589: error: no match for `fpos_t& += unsigned int' operator
sca10p.cpp: In member function `int PUERTOS_10C::Buscar(FPUERTOS_10S*, char*,
char*)':
sca10p.cpp:600: error: no match for `fpos_t& = long int' operator
/usr/include/_G_config.h:27: error: candidates are: _G_fpos_t&
_G_fpos_t::operator=(const _G_fpos_t&)
sca10p.cpp:607: error: no match for `fpos_t& += unsigned int' operator
sca10p.cpp:615: error: no match for `fpos_t& += unsigned int' operator
sca10p.cpp: In member function `int PUERTOS_10C::Buscar(FPUERTOS_10S*, char*,
int)':
sca10p.cpp:629: error: no match for `fpos_t& = long int' operator
/usr/include/_G_config.h:27: error: candidates are: _G_fpos_t&
_G_fpos_t::operator=(const _G_fpos_t&)
sca10p.cpp:639: error: no match for `fpos_t& += unsigned int' operator
sca10p.cpp: In member function `int PUERTOS_10C::BuscarLibre(FPUERTOS_10S*,
char*, char*)':
sca10p.cpp:686: error: no match for `fpos_t& = long int' operator
/usr/include/_G_config.h:27: error: candidates are: _G_fpos_t&
_G_fpos_t::operator=(const _G_fpos_t&)
sca10p.cpp:694: error: no match for `fpos_t& += unsigned int' operator
sca10p.cpp:697: error: no match for `fpos_t& += unsigned int' operator
sca10p.cpp:700: error: no match for `fpos_t& += unsigned int' operator
sca10p.cpp:703: error: no match for `fpos_t& += unsigned int' operator
sca10p.cpp: In member function `int PUERTOS_10C::BuscarLibre(FPUERTOS_10S*,
char*)':
sca10p.cpp:713: error: no match for `fpos_t& = long int' operator
/usr/include/_G_config.h:27: error: candidates are: _G_fpos_t&
_G_fpos_t::operator=(const _G_fpos_t&)
sca10p.cpp:721: error: no match for `fpos_t& += unsigned int' operator
sca10p.cpp:724: error: no match for `fpos_t& += unsigned int' operator
sca10p.cpp: In member function `int
PUERTOS_10C::encontrarPrimero(FPUERTOS_10S*, char*)':
sca10p.cpp:919: error: no match for `fpos_t& = long int' operator
/usr/include/_G_config.h:27: error: candidates are: _G_fpos_t&
_G_fpos_t::operator=(const _G_fpos_t&)
sca10p.cpp: In member function `int
PUERTOS_10C::encontrarSiguiente(FPUERTOS_10S*, char*)':
sca10p.cpp:931: error: no match for `fpos_t& = long int' operator
/usr/include/_G_config.h:27: error: candidates are: _G_fpos_t&
_G_fpos_t::operator=(const _G_fpos_t&)
Anyone knows what can I do? I tried in a lower version gcc and gives
the same error... in gcc 3.3 too...
And tried to install egcs but I can't make it work.
I would aprecciate any help you can give me!!
--------------------------------------------
Luis Fernando Molina Cordero.
--------------------------------------------
Luis Fernando Molina Cordero.
"Tu sonrisa abrazada a la muerte ronda Buenos Aires
Y te vio Guatemala volando tras de algún camión
Fue Bolivia quien te vio partir
Fue mi verso para tu canción
Como un sueño empapado en tequila y en Revolución"