I have a source file, well actually it is a Google API library.
It has this code on GTLCommon_Sources.m
:
#if defined(__has_feature) && __has_feature(objc_arc)
#error "This file needs to be compiled with ARC disabled."
#endif
#import "Objects/GTLBatchQuery.m"
#import "Objects/GTLBatchResult.m"
#import "Objects/GTLDateTime.m"
#import "Objects/GTLErrorObject.m"
#import "Objects/GTLObject.m"
#import "Objects/GTLQuery.m"
#import "Objects/GTLRuntimeCommon.m"
#import "Objects/GTLService.m"
#import "Objects/GTLUploadParameters.m"
#import "Utilities/GTLBase64.m"
#import "Utilities/GTLFramework.m"
#import "Utilities/GTLJSONParser.m"
#import "Utilities/GTLUtilities.m"
However, try to build it, results on duplicate symbols on GTLCommon_Sources
and GTLJSONParser
. I tried change the source file to #import "Utilities/GTLJSONParser.h"
instead of #import "Utilities/GTLJSONParser.m"
and the duplicate symbols error goes away.
Can anyone advise why this library imports a .m file? While AFAIK, we always import .h file.