如何在 Qt Creator (Mac OS X) 中添加 Qt SDK

发布于 10-13 20:07 字数 448 浏览 3 评论 0原文

我需要使用静态版本的 Qt SDK 编译我的 Qt 项目。

因此,我使用以下步骤从源代码编译了一个新的 SDK:

configure (+some options)
make
sudo make -j1 install

我认为所有这些步骤都是成功的,我可以在 /usr/local/Trolltech 中看到该 SDK。然后,如参考所示,我将这两行添加到我的.profile 文件:

PATH=/usr/local/Trolltech/Qt-4.7.1/bin:$PATH
export PATH

但是,当我启动 Qt Creator 时,它没有使用这个新的 SDK,而是仍然使用最初安装的 SDK。我如何更改它并使其使用我的新 SDK?

I need to compile my Qt project using a static version of the Qt SDK.

So I have compiled from source a new SDK using these steps:

configure (+some options)
make
sudo make -j1 install

I think all these steps were successful and I can see the SDK in /usr/local/Trolltech. Then, as indicated on the reference, I have added these lines two my .profile file:

PATH=/usr/local/Trolltech/Qt-4.7.1/bin:$PATH
export PATH

However, when I start Qt Creator, it is not using this new SDK but still using the one that was installed initially. How can I change that and make it use my new SDK?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

柏林苍穹下2024-10-20 20:07:29

在 QtCreator 的首选项中,有“Qt4”项(左侧),您可以在其中手动指定 Qt 的路径。

关于 PATH 变量的更改,只有从终端启动 QtCreator 时才会考虑它们。

In QtCreator's preferences, there's "Qt4" item (on the left) where you can specify path to your Qt manually.

Regarding PATH variable changes, they'll only be taken into account if you start QtCreator from Terminal.

青衫负雪2024-10-20 20:07:29

为了允许 Creator 在 PATH 中找到 Qt 安装,您需要为 GUI 应用程序设置 PATH 变量。以下是有关如何在 OS X 中设置它的一些讨论:

https:// serverfault.com/questions/16355/how-to-set-global-path-on-os-x

查找对“environment.plist”的修改。

To allow Creator to find the Qt installation in PATH, you need to set the PATH variable for GUI apps. Here's some discussion on how to set it in OS X:

https://serverfault.com/questions/16355/how-to-set-global-path-on-os-x

Look for modification to "environment.plist".

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