更改Xcode中的工作目录 [英] Change the working directory in Xcode

查看:88
本文介绍了更改Xcode中的工作目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设法使用cmake -G Xcode让我的C ++项目在Xcode中运行。现在我想调试它,因为它提供了漂亮的gdb前端。



然而,我需要更改gdb执行的工作目录,否则它将无法工作。 (它需要从相对于工作目录路径的文件中读取一些数据)我可以做的是在gdb停止键入cd working_dir之后,然后手动运行它,键入r。这个工作,但Xcode会不断抱怨,也不是一个优雅的解决方案。



因此,在构建设置的某处我应该能够设置工作目录..但在哪里在Xcode上对可执行文件执行获取信息并查看第一个选项卡 - 在那里有一个设置为工作目录。


I managed to get my C++ project running in Xcode using cmake -G Xcode. Now I would like to debug it, because of the nice gdb fronted it provides.

However I need to change the working directory where gdb is executed otherwise it wont work. (It needs to read some data from files relative to the path of the working directory) What I can do is after gdb has stopped typing cd working_dir and then run it manually typing r. This works, but Xcode will complain constantly and is also not an elegant solution.

So somewhere in the build settings I should be able to set the working directory..but where?!

解决方案

In Xcode do a "Get Info" on the executable and look at the first tab - there is a setting there for working directory.

这篇关于更改Xcode中的工作目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆