RHEL5 Qt 编译器/链接器/qmake 问题...建议?

发布于 2024-08-11 09:47:37 字数 738 浏览 9 评论 0原文

我在新安装 Qt SDK 时遇到一些问题。我可能只需要建议,但也欢迎具体答案。在开始一个小故事之前,我正在 OSX 10.6 上的 VirtualBox 下以学术许可证运行 RHEL5。使用 Qt 版本 4.5.3。这是我的情况...

1.) 我无法编译,因为找不到 g++。我通过创建链接解决了这个问题:g++ -> g++34。这允许我编译,但它在链接时产生更多错误。我无意中将框架安装在我的主目录中,因此我将整个 SDK 卸载/重新安装到 /usr/local/qt。

2.) 此时我可以编译,但链接器抱怨缺少 freetype 包。我已经安装了,但不知道为什么找不到它。因此,我安装了一些我认为可能缺少的软件包,例如 libqt4-devel 和 libqt4-devel-debug。我还安装了其他几个通用编程包以供以后使用。

3.) 在此过程中,我无法再运行 qmake。我之前运行过它,并将其安装在 /usr/local/qt/qt/bin/qmake 中。我可以创建指向它的链接(尽管我不必这样做,或者我可以确保该位置位于 PATH var 中)。然而,此时 Qt Creator 表示未找到 Qt 安装。我将它重新指向安装位置(使用工具/选项),但它仍然不会运行 qmake 或其他任何东西...

我只需要这个 linux 安装来编译和测试我正在开发的 Qt 项目操作系统。所以我的问题是,我是否应该擦除此 RHEL 安装并重新开始?如果是这样,我应该使用其他东西,比如 Ubuntu 吗?我有很多麻烦,我不想按原样处理。请注意,该项目需要良好的 OpenGL 支持。

I have about a few problems with a new install of the Qt SDK. I probably only need advice, but specific answers are also welcome. Before I begin a mini-story, I am running RHEL5 on academic license under VirtualBox on OSX 10.6. Using Qt version 4.5.3. This is my situation...

1.) I couldn't compile because g++ wasn't found. I fixed this by creating a link: g++ -> g++34. This allowed me to compile but it generated more errors at link-time. I had installed the framework in my home directory unintentionally so I uninstalled/reinstalled the entire SDK to /usr/local/qt.

2.) At this point I could compile but the linker complained about a missing freetype package. I had that already installed but wasn't sure why it couldn't be found. So I installed a few packages that I thought might be missing like libqt4-devel and libqt4-devel-debug. I also installed a few other general programming packages for later use.

3.) Somehwere in this process I can no longer run qmake. I ran it before and I have it installed at /usr/local/qt/qt/bin/qmake. I could create a link to it (though I shouldn't have to OR I could ensure that the location was in the PATH var). However, at this point Qt Creator says there's no Qt installation found. I re-pointed it to the installation location (using Tools/Options) but it still won't run qmake or anything else for that matter...

I only need this linux install to compile and test my Qt projects which I am developing in OSX. So my question is, should I just wipe this RHEL install and start over? And if so, should I use something else like Ubuntu? I am having plenty of hassles that I don't want to deal with as is. Note, this project will require good OpenGL support.

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

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

发布评论

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

评论(2

念三年u 2024-08-18 09:47:37

您不简单地使用 RHEL 一部分的 Qt 软件包是否有特殊原因?

如果由于某种原因您需要构建自己的,您可以通过以下方式获取所有构建依赖项:

$ yum install yum-utils
$ yum-builddep <whatever the qt package's name is>

Is there a particular reason that you don't simply use the Qt package that's part of RHEL?

If for some reason you need to build your own, you can get all of the build dependancies with:

$ yum install yum-utils
$ yum-builddep <whatever the qt package's name is>
你丑哭了我 2024-08-18 09:47:37

@scotchi 是对的,你应该尝试使用系统附带的 Qt 包,除非你需要一个非常不同的版本。我不知道 RHEL 附带的 Qt 版本是什么,但如果它对您来说不够最新(也可能不是,请参见下文),那么您可以考虑更改操作系统版本。不过,我只会在尝试了他的建议后才这样做,因为您也许可以让事情正常运行,而无需安装完整操作系统的麻烦。

现在,至于您可能想要切换的原因:正如其名称(“企业 Linux”)所示,RHEL 面向想要运行服务器或大型桌面部署的公司。它强调稳定性和可靠性,而不是尖端技术。编译器和开发库的版本通常会稍微落后于曲线。这就是他们的客户想要的:一个稳定的平台,他们可以在一段时间内开发和运行程序,而不需要经常跟上最新的变化,并且经过彻底的测试。但对于在家进行开发的人来说,可能没有必要保持那么保守。我不知道这是否适用于工作、学校或个人编程,但在我看来,您应该转向更面向桌面的发行版之一。 Ubuntu 很棒,Fedora 也很棒。如果您更喜欢类似 RHEL 的环境,请选择 Fedora。

@scotchi is right, and you should try to use the Qt package that comes with your system unless you need a very different version. I don't know what version of Qt comes with RHEL but if its not up-to-date enough for you (and it might not be, see below) then you could consider changing OS versions. I would only do this after trying his suggestion though, because you may be able to get things working without the hassle of a full OS install.

Now, as to why you might want to switch: RHEL is, as its name ("Enterprise Linux") indicates aimed at companies who want to run servers, or large deployments of desktops. It emphasizes stability and reliability over being cutting edge. Fairly often the version of the compiler and development libraries lag a little behind the curve. This is what their clients want: a stable platform they can develop against and run programs on for a period of time, not constantly needing to keep up with the latest changes, and thoroughly tested. But for people doing development at home it may not be necessary to stay that conservative. I don't know if this is for work, school or personal programming, but it sounds to me like you should move to one of the more desktop-oriented distros. Ubuntu is great, as is Fedora. If you prefer a RHEL-like environment, then choose Fedora.

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