“环境变量太长”在Xcode 4中
我有一个由 cmake 生成的 Xcode 4 项目。
当我在 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 ,但不起作用 如何设置环境Xcode 4 中我的产品的变量?
谢谢
I have a Xcode 4 project generated by cmake.
When I build and try to debug on my iOS device (ipod/ipad)
The gdb console prints such message:
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 prints these messages continuously such that I can't debug my program.
I'm sure I didn't set DYLD_FRAMEWORK_PATH.
Maybe xcode4 or cmake can set/unset this environment variable somewhere?
I already tried reset DYLD_FRAMEWORK_PATH like this answer, but doesn't work
How do I set up environment variables for my product in Xcode 4?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不确定这是否是您的问题,但如果您在目标的构建设置中设置标头/框架/库搜索路径并点击递归复选框,它将递归地添加每个子路径。这可能是大量路径(字符串太长,无法容纳环境变量)。这给我带来了类似的问题。
在这种情况下,我真正想做的是为主标题或特定框架或框架文件夹的位置添加一个搜索路径。一旦我做出了调整,效果就很好。
Not sure if this is your problem or not, but if you set header/framework/library search paths in your target's build settings and hit the recursive checkbox, it'll recursively add every subpath. That can be a huge number of paths (too long a string to fit in an env var). This has caused similar problems for me.
What I really meant to do in that case was to add just one search path for the location of a main header or specific framework or folder of frameworks. Once I made that adjustment, it worked fine.