[prev in list] [next in list] [prev in thread] [next in thread]
List: mico-support
Subject: Re: MICO-SUPP: compiling mico.2.11
From: Marcus Portmann <marcus () dydx ! com>
Date: 1998-10-23 19:46:07
[Download RAW message or body]
Hi,
I had the same problem. This code compiled perfectly under gcc 2.7.2.
Seems that egcs is a lot stricter on variable scope. The variable status
is not initialised at the beginning of the function but just before use
in an if {} statement.
There are two ways to fix this that i found.
1. Define status at the beginning of every function that it is used
2. My personal hack a global variable call status ;) I know this is
really bad coding but didnt have time to fix it properly.
hope this helps
marcus
Udo Sprotte wrote:
>
> Hy,
>
> while compiling time mico V 2.11 I got an error message like this:
>
> c++ -I../include -O -fno-exceptions -I/usr/local/include -I/usr/local/qt/include \
> -fexceptions -O0 -c poa_impl.cc -o poa_impl.o c++ -I../include -O \
> -fno-exceptions -I/usr/local/include -I/usr/local/qt/include -c service_info.cc -o \
> service_info.o c++ -I../include -O -fno-exceptions -I/usr/local/include \
> -I/usr/local/qt/include -c os-unix.cc -o os-unix.o
> os-unix.cc: In function `static void MICO::UnixProcess::signal_handler(int)':
> os-unix.cc:80: `status' undeclared (first use this function)
> os-unix.cc:80: (Each undeclared identifier is reported only once
> os-unix.cc:80: for each function it appears in.)
> os-unix.cc:80: warning: ANSI C++ forbids declaration `__in' with no type
> os-unix.cc:81: warning: ANSI C++ forbids declaration `__in' with no type
> make[1]: *** [os-unix.o] Error 1
>
> I compiled this on linux with egcs 1.03. Do you know what reason is ?
>
> Best regards
> --
> Udo Sprotte | Tel. : +49-541-333-2435
> Deutsche Telekom AG | Tel. : +49-541-188273 (privat)
> Hannoversche Str.6-8| Fax. : +49-541-333-2490
> 49084 Osnabrueck | e-mail: Udo.Sprotte@telekom.de
> X400: c=DE, a=viaT, p=t400, s=Sprotte, g=Udo
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic