Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XCode: "Analyzer skipped this file due to parse errors"

my project includes a simple C file with a header. Like this:

#ifndef __IMAGE_ARRAY_3D
#define __IMAGE_ARRAY_3D

typedef struct ImageArray3D {
    double *data;                       // The image data
    LargeElement *largestElements;      // c * nLargestElements
    int c, w, h, nLargestElements;
} tImageArray3D;     // Error points to here

...

#endif

When I run XCode's static analyzer, I get the following error:

Analyzer skipped this file due to parse errors

redefinition of 'ImageArray3D' as different kind of symbol

What is the cause of this?

like image 341
Norbert Avatar asked Feb 18 '26 08:02

Norbert


2 Answers

Here is a solution for the problem: Solution!

The recommended solution is to add the following to Other C Flags in your project's build settings: -D__IPHONE_OS_VERSION_MIN_REQUIRED=040100 where you replace 040100 with your deployment target version (030000 for 3.0, for example).

like image 178
Daniel Avatar answered Feb 20 '26 20:02

Daniel


Sounds like your project, or the OS X libraries, already define and use ImageArray3D. Just rename it and it will probably work.

like image 21
Gregor Brandt Avatar answered Feb 20 '26 21:02

Gregor Brandt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!