Re: Static Analyzer Problems
Re: Static Analyzer Problems
- Subject: Re: Static Analyzer Problems
- From: Laurent Daudelin <email@hidden>
- Date: Fri, 28 Oct 2011 16:09:18 -0700
On Oct 28, 2011, at 01:44, Dave wrote:
> Hi All,
>
> I've inherited a Mac project that is a bit of a mess. The previous person (a Window's programmer) decided it was a good idea to develop a core "engine" (15 source files out of a total of 60) in C++ on windows and then move onto the Mac/XCode 3 and "bend" the project settings to suit it. Also where there is Objective-C code it doesn't conform to the Cocoa guide lines and some it has been made to "look" like C++, things like this:
>
> obj = [OBJECT alloc];
> obj = [obj init];
> [obj Construct];
>
> And in the init method:
>
> -(id) init
> {
> [super init];
>
> return self;
> }
>
> This project was developed using XCode 3 and I can't get it to compile under XCode 4. So I decided to stay with XCode 3. The project compiles and runs ok, but has 170 warnings. If I try to do a Build and Analyze I get the following error over and over on all the source files:
>
> Analyzer skipped this file due to parse errors
>
> fatal error: "/var/folders/u2/-RANDOM-STRING-/-caches-com.apple.XCode.501/SharedPrecompiledHeaders/LTW_MAC_Prefix-RANDOM-STRING/LTW_MAC_Prefix.pch" file not found
>
> I can't figure out why I should get this error since the project compiles ok. The only thing I can think of is that I think that the C++ code is reliant on GCC and the Analyzer uses LVM as far as I know? But why this should cause it to lose the precompiled headers file is beyond me.
>
> Any help on this and any advice/suggestions on how to proceed on this project would be gratefully appreciated. I obviously want to get rid of the C++ Code, but it is deeply entrenched in the rest of the objective-c UI (No MVC in this project!!).
>
> All the Best
> Dave
Dave, the "pch" file is pre-compiled header. Have you tried to do a clean, then a build? Usually, that would recreate the precompile header file. There will likely be other errors but that's the starting point. The build is failing because this file is missing.
-Laurent.
--
Laurent Daudelin
AIM/iChat/Skype:LaurentDaudelin http://www.nemesys-soft.com/
Logiciels Nemesys Software email@hidden
_______________________________________________
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