安装macports和wxWidgets后出现Xcode错误

时间:2015-04-03 11:04:57

标签: xcode wxwidgets deprecated macports

我在使用Xcode 4.3.2时遇到问题,每当我尝试在Objective-C中编译应用程序或.m文件时,它就会开始显示所有的弃用错误。编译按顺序进行,但速度很慢,会弹出200多个错误。

这是在我使用macports安装wxWidgets 3.0之后开始的 我使用了这个命令:

sudo port install wxWidgets-3.0 +universal
sudo port select --set wxWidgets wxWidgets-3.0

之后我按照本页面上的所有说明配置Xcode: creating-a-wxwidgets-xcode

所以我添加了解释C ++标志,链接器标志,我拖放库,我按照说明更改了plist文件等等。

然而,当我尝试运行代码时,它没有工作,它给了我这个错误:

  

ld:找不到-lwx_osx_cocoau_xrc-3.0的库   clang:错误:链接器命令失败,退出代码为1(使用-v查看   调用)

我决定放弃wxWidgets一段时间并继续前进另一个项目。但每当我尝试编译一些Objective-C .m文件时,我都会遇到这些错误:

  

包含来自的文件   /Users/norman/Documents/wxwidget/eijbrsthbigrt/eijbrsthbigrt/eijbrsthbigrt-Prefix.pch:6:   在包含的文件中   /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Foundation.framework/Headers/Foundation.h:70:   在包含的文件中   /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Foundation.framework/Headers/NSURLCredential.h:9:   在包含的文件中   /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Security.framework/Headers/Security.h:25:   在包含的文件中   /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Security.framework/Headers/cssmapple.h:30:   /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Security.framework/Headers/cssmtype.h:142:5:   警告:' CSSM_GUID'已弃用[-Wdeprecated-declarations]       CSSM_GUID指导;       ^ /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Security.framework/Headers/cssmtype.h:143:5:   警告:' CSSM_VERSION'已弃用[-Wdeprecated-declarations]       CSSM_VERSION版本;       ^ /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Security.framework/Headers/cssmtype.h:156:12:   警告:' CSSM_GUID'已弃用[-Wdeprecated-declarations]       (const CSSM_GUID * ModuleGuid,

1)这只是一个摘录,有200多个错误

2)eijbrsthbigrt是项目的名称

我已尝试使用defaults delete com.apple.dt.Xcode将Xcode重置为默认值 但错误仍然存​​在

我尝试卸载macports:sudo port -fp uninstall installed 但我收到了这条消息:

  

-bash:$:找不到命令

我还是不想卸载它。所以我并没有坚持这一点。

我真的不知道现在该做什么,因为我不太了解问题的来源,所以提前感谢你的帮助。

1 个答案:

答案 0 :(得分:0)

我卸载了macports,wxWidget和XCode,然后重新安装了Xcode ......它需要很多时间,但它解决了我的问题......