🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.mac.programmer.codewarrior
4 messages
4 total messages Started by topdancer Thu, 24 Oct 2002 06:56
Variable re-declared error
#920
Author: topdancer
Date: Thu, 24 Oct 2002 06:56
12 lines
1404 bytes
I tried to convert an old CW 7 project to CW 8.2. The compiler showed
some error messages that a function was wrongly re-declared. In fact,
the function prototype in the corresponding header file was different
from the function itself, some variables were missing in the header
file (CW 7 did not see this error!).

After correcting these issues, the error messages did NOT go away,
although the header file was correct in number and type of variables.

Why? How can I resolve this?

Kurt
Re: Variable re-declared error
#921
Author: Daniel T.
Date: Thu, 24 Oct 2002 11:55
18 lines
2006 bytes
In article <a926f6f0.0210232256.254d397f@posting.google.com>,
 kurt.bierbaum@t-online.de (topdancer) wrote:

>I tried to convert an old CW 7 project to CW 8.2. The compiler showed
>some error messages that a function was wrongly re-declared. In fact,
>the function prototype in the corresponding header file was different
>from the function itself, some variables were missing in the header
>file (CW 7 did not see this error!).
>
>After correcting these issues, the error messages did NOT go away,
>although the header file was correct in number and type of variables.
>
>Why? How can I resolve this?

First check that the header file you changed is actually the one that CW 
is using. One easy way to do that (if the header isn't being included in 
very many places) it to put a #pragma error in the header and see of 
that causes the compile to barf.
Re: Variable re-declared error
#922
Author: MW Ron
Date: Thu, 24 Oct 2002 13:23
28 lines
2186 bytes
In article <a926f6f0.0210232256.254d397f@posting.google.com>,
 kurt.bierbaum@t-online.de (topdancer) wrote:

>I tried to convert an old CW 7 project to CW 8.2. The compiler showed
>some error messages that a function was wrongly re-declared. In fact,
>the function prototype in the corresponding header file was different
>from the function itself, some variables were missing in the header
>file (CW 7 did not see this error!).
>
>After correcting these issues, the error messages did NOT go away,
>although the header file was correct in number and type of variables.
>
>Why? How can I resolve this?

We really should see the error message.  As Daniel said this may be a 
case of changing a wrong file or the file being cached.  It may be that 
this is in the precompiled headers  and you will need to update that.  
It also may be a matter of const/volatile and you'll need to fix that in 
your source.

Ron

-- 
  Do what you do best and let Metrowerks do the rest !!
  http://www.metrowerks.com/MW/Services/SSG/default.htm

 Metrowerks, maker of CodeWarrior  -  "Software Starts Here"
Ron Liechty - MWRon@metrowerks.com - http://www.metrowerks.com
Re: Variable re-declared error
#924
Author: topdancer
Date: Sat, 26 Oct 2002 05:43
13 lines
1432 bytes
"Daniel T." <a@b.c> wrote in message 
> 
> First check that the header file you changed is actually the one that CW 
> is using. One easy way to do that (if the header isn't being included in 
> very many places) it to put a #pragma error in the header and see of 
> that causes the compile to barf.

Daniel,

thanks, good tip, the project used a second copy of the header files.
Now it compiles completely.

Kurt
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads