当选择10.5时,XCode 3.2配置仍然访问OS X 10.4框架

时间:2009-09-22 09:26:30

标签: xcode macos frameworks

我想尝试使用10.5中引入的一些功能(如Core Text),因此我将Base SDK和Deployment目标都设置为Mac OS X 10.5 我也确定所有引用的Frameworks都有一个相对于所选SDK的路径,工具提示当前也说它正在查看10.5文件夹。

当我尝试编译它时,我得到各种警告和错误,使它看起来仍然引用10.4:

/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OpenTransportProviders.h:1492:0 /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OpenTransportProviders.h:1492: warning: 'OTSetNBPEntityFromAddress' is deprecated (declared at /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OpenTransportProviders.h:1172)

.../code/utils/modules/Skins/SkinFont.h:36:0 .../code/utils/modules/Skins/SkinFont.h:36: error: 'CTFontRef' does not name a type

更奇怪的是,这在“调试”配置中不起作用,但它在另一个配置中成功运行。 我比较了所有配置设置,但我发现没有任何区别。

有谁知道我是否还有其他地方需要这个?

编辑:我确实从其他人那里发现了一个类似的问题,但遗憾的是还没有有用的回复: http://lists.apple.com/archives/xcode-users/2009/Sep/msg00200.html

Edit2:这是编译器输出,我删除了一些警告,因为提到了大约50个已弃用的函数。

CompileC build/Test10_4.build/Debug/djDecks_Mac.build/Objects-normal/i386/DJDecksVideoRenderer.o ../code/utils/modules/djDecks/DJDecksVideoRenderer.cpp normal i386 c++ com.apple.compilers.llvmgcc42 cd /Users/gwenroelants/Test10_4 setenv LANG en_US.US-ASCII /Developer/usr/bin/llvm-gcc-4.2 -x c++ -arch i386 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -DHAVE_STRERROR -DUSEFFMPEG -D__MACOSX__ -isysroot /Developer/SDKs/MacOSX10.5.sdk -mfix-and-continue -msse3 -fvisibility-inlines-hidden -mmacosx-version-min=10.5 -gdwarf-2 -I/Users/gwenroelants/Test10_4/build/Test10_4.build/Debug/djDecks_Mac.build/djDecksForMac.hmap -F/Users/gwenroelants/Test10_4/build/Debug -F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks -I/Users/gwenroelants/code/lib/ffmpeg/ffmpeg -I/Users/gwenroelants/code/lib/flac/src/libFLAC/include -I/Users/gwenroelants/code/lib/flac/include -I/Users/gwenroelants/Test10_4/build/Debug/include -I/Users/gwenroelants/Test10_4/build/Test10_4.build/Debug/djDecks_Mac.build/DerivedSources/i386 -I/Users/gwenroelants/Test10_4/build/Test10_4.build/Debug/djDecks_Mac.build/DerivedSources -isysroot /Developer/SDKs/MacOSX10.5.sdk -include /var/folders/Hh/Hhx2ce3OHReLY+QJa3OmM++++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Test10_4_Prefix-cqnssmqwhfbgbtdcgyppeyqdmggp/Test10_4_Prefix.pch -c /Users/gwenroelants/Test10_4/../code/utils/modules/djDecks/DJDecksVideoRenderer.cpp -o /Users/gwenroelants/Test10_4/build/Test10_4.build/Debug/djDecks_Mac.build/Objects-normal/i386/DJDecksVideoRenderer.o Headers/OSServices.h:46, from /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:28, from /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioFile.h:27, from /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioToolbox.h:22, from /Users/gwenroelants/Test10_4/../code/utils/modules/AudioDecoder/AudioDecoder.h:37, from /Users/gwenroelants/Test10_4/../code/utils/modules/Audio/player.h:10, from /Users/gwenroelants/Test10_4/../code/utils/modules/Audio/FModPlayer.h:9, from /Users/gwenroelants/Test10_4/../code/utils/modules/djDecks/DJDecksPlayer.h:9, from /Users/gwenroelants/Test10_4/../code/utils/modules/djDecks/DJDecksVideoRenderer.h:9, from /Users/gwenroelants/Test10_4/../code/utils/modules/djDecks/DJDecksVideoRenderer.cpp:7: /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OpenTransportProviders.h: In member function 'OSStatus TInternetServices::StringToAddress(char*, InetHostInfo*)': /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OpenTransportProviders.h:581: warning: 'OTInetStringToAddress' is deprecated (declared at /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OpenTransportProviders.h:504) /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OpenTransportProviders.h: In member function 'OSStatus TInternetServices::Query(char*, UInt16, UInt16, char*, OTByteCount, void**, OTByteCount, OTFlags)': /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OpenTransportProviders.h:596: warning: 'OTInetQuery' is deprecated (declared at /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OpenTransportProviders.h:571) /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OpenTransportProviders.h:596: warning: 'OTInetQuery' is deprecated (declared at /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OpenTransportProviders.h:571) /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OpenTransportProviders.h: In member function 'OSStatus TAppleTalkServices::GetMyZone(TNetbuf*)': /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OpenTransportProviders.h:903: warning: 'OTATalkGetMyZone' is deprecated (declared at /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OpenTransportProviders.h:846) OpenTransportProviders.h:1492: warning: 'OTSetNBPEntityFromAddress' is deprecated (declared at /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OpenTransportProviders.h:1172) /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OpenTransportProviders.h:1492: warning: 'OTSetNBPEntityFromAddress' is deprecated (declared at /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OpenTransportProviders.h:1172) In file included from /Users/gwenroelants/Test10_4/../code/utils/modules/Skins/SkinObject.h:15, from /Users/gwenroelants/Test10_4/../code/utils/modules/Skins/SkinTab.h:10, from /Users/gwenroelants/Test10_4/../code/utils/modules/Skins/SkinTabGroup.h:11, from /Users/gwenroelants/Test10_4/../code/utils/modules/Skins/SkinWindow.h:12, from /Users/gwenroelants/Test10_4/../code/utils/modules/Skins/Skin.h:12, from /Users/gwenroelants/Test10_4/../code/utils/modules/djDecks/DjDecks.h:11, from /Users/gwenroelants/Test10_4/../code/utils/modules/djDecks/DJDecksPlayer.h:16, from /Users/gwenroelants/Test10_4/../code/utils/modules/djDecks/DJDecksVideoRenderer.h:9, from /Users/gwenroelants/Test10_4/../code/utils/modules/djDecks/DJDecksVideoRenderer.cpp:7: /Users/gwenroelants/Test10_4/../code/utils/modules/Skins/SkinFont.h: At global scope: /Users/gwenroelants/Test10_4/../code/utils/modules/Skins/SkinFont.h:36: error: 'CTFontRef' does not name a type /Users/gwenroelants/Test10_4/../code/utils/modules/Skins/SkinFont.h:37: error: 'CTFontRef' does not name a type

3 个答案:

答案 0 :(得分:3)

在无效的配置中,在Build Settings搜索字段中输入“10.4”,看看会出现什么。我希望框架搜索路径构建设置有一个到10.4 SDK的显式路径。

拥有编译器调用的文本确实很有帮助,只需拖放“编译”构建步骤失败即可。

更新

感谢您发布日志。在那里非常清楚:

-F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks

这意味着即使您使用10.5 SDK,也有一个框架搜索路径直接指向10.4u SDK。您必须浏览目标并预测框架搜索路径并找到此路径并将其删除。

答案 1 :(得分:2)

我遇到了同样的问题。我的解决方案......

转到Project->编辑项目设置...并查找Base SDK(在Architectures下)。由于我使用的是10.6,我将我改为“Mac OS X 10.6”并开始工作。

答案 2 :(得分:0)

我的猜测(根据我自己的经验)是目标,项目和配置都不一致。我还没弄明白哪一个优先于另一个......