LibComponentLogging-Core icon indicating copy to clipboard operation
LibComponentLogging-Core copied to clipboard

code indexer in Xcode throwing errors

Open otusweb opened this issue 11 years ago • 9 comments

When i build my project, i don't have any errors, but as soon as the compile is over, i have a few errors pop up. ie: /Users/olivier/Documents/elektra/src/elektra/elektra/ELEFetchedResultsViewControllerWithTableView.m:42:13: Implicit declaration of function 'lcl_log' is invalid in C99 /Users/olivier/Documents/elektra/src/elektra/elektra/ELEFetchedResultsViewControllerWithTableView.m:42:21: Use of undeclared identifier 'lcl_cCoreData' /Users/olivier/Documents/elektra/src/elektra/elektra/capture/ELEAddItemViewController.m:238:5: Implicit declaration of function 'lcl_log' is invalid in C99 /Users/olivier/Documents/elektra/src/elektra/elektra/capture/ELEAddItemViewController.m:238:13: Use of undeclared identifier 'lcl_cDeviceManagement'

Given that it compiles, and runs i can see that everything works, but i'd like to be able to get rid of those warning. Happy to give more details, but i'm not sure what is relevant

otusweb avatar Feb 06 '14 18:02 otusweb

Hi,

which Xcode version are you using?

Have you installed LibComponentLogging via CocoaPods, or manually via copying it into your project?

Best regards, Arne

aharren avatar Feb 07 '14 06:02 aharren

5.0.2

otusweb avatar Feb 07 '14 22:02 otusweb

Hi,

that's the same version I currently use.

In which file do you include the lcl.h file?

Is it possible to create a very small Xcode project which shows the problem and which you can share?

Best regards, Arne

aharren avatar Feb 08 '14 11:02 aharren

lcl.h is included in the prefix.pch file

#ifdef __OBJC__
    #import <CoreData/CoreData.h>
    #import <Foundation/Foundation.h>
    #import <MobileCoreServices/MobileCoreServices.h>
    #import <SystemConfiguration/SystemConfiguration.h>
    #import <UIKit/UIKit.h>

    #import "lcl.h"
#endif

I'll look into creating a small project reproving the issue

otusweb avatar Feb 10 '14 20:02 otusweb

Perhaps there's a target which doesn't use the prefix.pch file?

aharren avatar Feb 13 '14 20:02 aharren

I do have two targets (one for the app and one for unit test), both use the same .pch file apparently, could that be the issue? I'll try creating another pch file that does not import lcl.h

otusweb avatar Feb 18 '14 18:02 otusweb

I have a similar configuration at https://github.com/aharren/CardDecks/tree/3.0, the app and the unit tests both use the same .pch file.

aharren avatar Feb 18 '14 20:02 aharren

@otusweb any update here?

aharren avatar May 18 '14 10:05 aharren

Sorry, no update. I still see it happening, but have not been able to narrow down the conditions

otusweb avatar May 20 '14 18:05 otusweb