2011-07-12 60 views
4

我有一個由cmake生成的Xcode 4項目。Xcode 4中的「Environment Variable is too long」

當我建立並嘗試我的iOS設備上調試器(iPod/iPad的)

GDB的控制檯打印這樣的消息:

warning: Environment variable too long, skipping: DYLD_FRAMEWORK_PATH=/Users/dokinkon/src/gamekit/build_iphone/Samples/IPhoneDemo/bin-iphoneos/Release:/Users/dokinkon/src/gamekit/build_iphone/Dependencies/Source/GameKit/Utils/bin-iphoneos/Release:/Users/dokinkon/src/gamekit/build_iphone/Dependencies/Source/GameKit/AnimKit/bin-iphoneos/Release:/Users/dokinkon/src/gamekit/build_iphone/Dependencies/Source/Blender25/Serialize/BlenderSerialize/bin-iphoneos/Release:/Users/dokinkon/src/gamekit/build_iphone/Dependencies/Source/Blender25/Serialize/BulletFileLoader/bin-iphoneos/Release:/Users/dokinkon/src/gamekit/build_iphone/Dependencies/Source/FreeImage/ZLib/bin-iphoneos/Release:/Users/dokinkon/src/gamekit/build_iphone/Dependencies/Source/FreeType/bin-iphoneos/Release:/Users/dokinkon/src/gamekit/build_iphone/Dependencies/Source/OIS/bin-iphoneos/Release:/Users/dokinkon/src/gamekit/build_iphone/Dependencies/Source/Codecs/bin-iphoneos/Release:/Users/dokinkon/src/gamekit/build_iphone/Dependencies/Source/Lua/lua/bin-iphoneos/Release:/Users/dokinkon/src/gamekit/build_iphone/Dependencies/Source/FreeImage/bin-iphoneos/Release:/Users/dokinkon/src/gamekit/build_iphone/Ogre-1.8/OgreMain/bin-iphoneos/Release:/Users/dokinkon/src/gamekit/build_iphone/bullet/src/BulletDynamics/bin-iphoneos/Release:/Users/dokinkon/src/gamekit/build_iphone/bullet/src/BulletCollision/bin-iphoneos/Release:/Users/dokinkon/src/gamekit/build_iphone/bullet/src/LinearMath/bin-iphoneos/Release:/Users/dokinkon/src/gamekit/build_iphone/Ogre-1.8/RenderSystems/GLES/bin-iphoneos/Release:/Users/dokinkon/src/gamekit/build_iphone/Ogre-1.8/PlugIns/ParticleFX/bin-iphoneos/Release:/Users/dokinkon/src/gamekit/build_iphone/Engine/bin-iphoneos/Release 

,GDB打印這些消息不斷,使得我不能調試我的程序。

我確定我沒有設置DYLD_FRAMEWORK_PATH。 也許xcode4或cmake可以在某處設置/取消設置這個環境變量?

我已經嘗試過復位DYLD_FRAMEWORK_PATH這樣的答案,但不起作用 How do I set up environment variables for my product in Xcode 4?

感謝

回答

0

不知道這是你的問題或沒有,但如果你設置頁眉/框架/庫搜索路徑在目標的構建設置中,點擊遞歸複選框,它會遞歸地添加每個子路徑。這可能是大量的路徑(太長的字符串以適應env var)。這對我造成了類似的問題。

在這種情況下,我真正要做的就是爲主標題或特定框架或框架文件夾的位置添加一條搜索路徑。一旦我做了調整,它運作良好。

相關問題