“环境变量太长”在Xcode 4中

发布于 2024-11-19 13:41:50 字数 2160 浏览 4 评论 0原文

我有一个由 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

暖树树初阳… 2024-11-26 13:41:51

不确定这是否是您的问题,但如果您在目标的构建设置中设置标头/框架/库搜索路径并点击递归复选框,它将递归地添加每个子路径。这可能是大量路径(字符串太长,无法容纳环境变量)。这给我带来了类似的问题。

在这种情况下,我真正想做的是为主标题或特定框架或框架文件夹的位置添加一个搜索路径。一旦我做出了调整,效果就很好。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文