Re: conflicting preprocessor definition found in two precompiled headers, target uses wrong one
Re: conflicting preprocessor definition found in two precompiled headers, target uses wrong one
- Subject: Re: conflicting preprocessor definition found in two precompiled headers, target uses wrong one
- From: Stuart Smith <email@hidden>
- Date: Wed, 16 May 2007 19:27:05 -0700
- Thread-topic: conflicting preprocessor definition found in two precompiled headers, target uses wrong one
following up on my on posting:
> I have a target TA which has its "Prefix Header" ( GCC_PREFIX_HEADER]) set to
>
> A.pch++
>
> which includes the definition
>
> #define XXX 0
>
> other targets in the same project use A.pch++, some use B.pch++.
>
> B.pch++ has this line:
>
> #define XXX 1.
>
> When I build target TA, I find that XXX evaluates to the wrong value, 1. When
> I right-click on XXX in a source file and choose "Jump to Definition", a popup
> appears which gives me too choices:
>
> #define XXX (A.pch++)
> #define XXX (B.pch++)
>
> How can this happen? I though a target can only include one precompiled
> header. How can I find out what is reading B.pch++?
As it turns out, the target was using the correct definition, but Code Sense
was confusing me. Or Code Sense was confused.
Another file in the project contains this block:
#if XXX
#define YYY 0
#else
#define YYY 1
#endif
In one of my source files, I highlighted "YYY", right-clicked and chose
"Jump to Definition" from the contextual menu. This highlighted the line
which reads
#define YYY 1
which implies that XXX is 0. I highlighted XXX and was given a choice of two
files with conflicting definitions of XXX (A.pch++ and B.pch++).
I can make either target A or target B the active target. They use A.pch++
and B.pch++, respectively. Regardless of which target is active, if I
right-click YYY, I'll see the "#define YYY 1" line highlighted. This would
appear to be a bug, because for target B, XXX is 1 and thus YYY is 0.
Also, the Code Sense contextual menu seems to be unaware of targets, so it
offers both definitions as choices, because the *Project* index knows about
both.
Is there some way I can find *for a specific target* what value a
preprocessor constant has and how it arrived at that value? Alternatively,
can I limit Code Sense results to one target?
Stuart
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden