Compilation error in MacOSX CoreServices on iOS

爱⌒轻易说出口 提交于 2019-12-11 09:55:07

问题


This is probably some silly thing I did wrong in using frameworks, but I spent some hours now, and hope someone can help!

My compilation error:

Expected * before * and error: expected declaration specifiers or '...' before 'CFXMLTreeRef' in WSMethodInvocation.h and WSProtocolHandler.h. Both in `/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreServices.framework´

They list files where UIKit and Foundation are included. I have included these framework, but not the CoreServices framework.

What I've tried:

  • I removed frameworks from my project folder that was accidentally copied there (I had checked "Copy resources" while adding them.)
  • I have made sure that the Framework Search Paths is empty. (from this question)
  • I chose Show in finder on all frameworks in the project, and they are all located under /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/System/Library.
  • In this answer it says Most of the CoreServices are not available on iOS. Instead, use #import <CFNetwork/CFNetwork.h>, so I tried that, desperately, with no luck. But again why do I even get an error in one of the MacOSX CoreServices classes?

It all worked fine before I started adding and moving projects and frameworks. I have tried to restore everything to how it was before, when it was working.


回答1:


I moved all my code to a new project. Works fine, using the same frameworks.

If anyone have an idea of what broke, that is still welcome. :)



来源:https://stackoverflow.com/questions/8116050/compilation-error-in-macosx-coreservices-on-ios

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!