문제

For using a concrete static library (.a file) in my project, I need to change the way in what Xcode Compile the source, from "According to File Type" to "Objective-C++" in build settings.

This change gives me several errors in other libraries (only files .h and .m) downloaded from GitHub such as: NGTabBarController, MWPhotoBrowser or SDWebImage, when I am trying to compile my project.

An example:

    [self downloadWithURL:url delegate:delegate options:(retryFailed ? SDWebImageRetryFailed : 0)];

Cannot initialize a parameter of type 'SDWebImageOptions' with an rvalue of type 'int'

I suppose they are derived errors from changing the compile way.

Is there any way to solve this avoiding remove any file?

Thanks in advance.

도움이 되었습니까?

해결책

Finally I got to solve this establishing Compile source as "According to File Type" and for each own file which uses the static library I had to rename them from ".m" to ".mm" (for forcing the files are compiled as "Objective-C").

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top