gpt4 book ai didi

linux - qmake 在 linux 上使用不正确的 Qt 安装路径

转载 作者:太空狗 更新时间:2023-10-29 11:05:43 35 4
gpt4 key购买 nike

我编译 qt (qt-everywhere-opensource-src-4.7.4) 使用:

./configure --prefix=/edrive/local/qt
gmake && gmake install

当我想用 qmake 创建新项目时,创建包含路径错误的 Makefile 并指向错误的二进制文件和库目录:

> qmake -query "QT_INSTALL_PREFIX"
/edrive/local

在生成文件中

包括:

-I/edrive/local/include/QtCore
-I/edrive/local/include/QtGui
-I/edrive/local/include

库:

-L/edrive/local/lib

用户界面:

/edrive/local/bin/uic

这些显然是错误的,因为 qt 安装在 /edrive/local/qt 中。

除了手动修改 qt 配置文件,有没有办法解决这个问题?我做错了什么吗?

顺便说一句,它正在选择正确的 qmake:

> which qmake
/edrive/local/bin/qt/qmake

最佳答案

您可以通过以下方式更改该值:

# qmake -set VARIABLE VALUE

即在你的情况下:

# qmake -set QT_INSTALL_PREFIX /edrive/local/qt

虽然从你的qmake位置来看,你调用了错误的qmake。尝试

/edrive/local/qt/bin/qmake -query "QT_INSTALL_PREFIX"

我感觉您还安装了 2 个 Qt。

关于linux - qmake 在 linux 上使用不正确的 Qt 安装路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8321664/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com