Closed attolee closed 10 years ago
@AttoLee I just added them in my project where i use SDWebImage and i got no errors. I believe this is the answer to your question: http://stackoverflow.com/questions/16999749/expected-at-the-end-of-declaration-list
i tried to change the C Language Dialect to C99 and i got the same error as you, so make sure its default value is Compiler Default.
@mythodeia the error disappeared when i had changed the C Language Dialect to Compiler Default, thanks for your help. i just wander is that possible to use GNU99 to compile one file, and meanwhile use default compiler to compile another file, the two file in the same project.
@AttoLee
of the top of my head could you try the following:
Go in Build Phases tab on the Compile Sources and double tap on your file.
Then add the flag you want. Maybe like this: -std=gnu99
I am not sure about the syntax or the validity of this but i cannot think of anywhere else you might be able to add this kind of feature.
Its like adding the -fno-objc-arc
per file. So i guess it might work!
Why if i may ask you want this flag enabled for 1 file?
@mythodeia the project that i am working on is generated by Unity, of which C Language Dialect is C99.
@AttoLee
did you add the compiler flag -std=gnu99
in the specific file you want?
Did it work?
@mythodeia i added the flag -std=gnu99 to UIImageView+UIActivityIndicatorForSDWebImage.m, more errors came.
@AttoLee have you added all the necessary frameworks for SDWebImage to work properly?
@mythodeia thank you, i missed ImageIO.framework. and i added -ObjC to Other Linker Flags. but
@AttoLee i think the MapKit framework is missing..check it out
@mythodeia thank you again. i have added MapKit framework, all right now..
@AttoLee good luck with your project
I copy the files into project, using Xcode 6.