新Qt目录无效

时间:2022-02-19 16:04:00

I've written an application using Qt on OS X. The installed SDK automatically installed as a framework which I didn't want. So I cloned their newest version from the Qt git repository and built it from source as static libraries. I would like it to compile using those static libraries instead of the framework but in preferences in setting the version/Path of Qt no matter what path I direct it to it says it's not a valid Qt directory. What has to be in a qt Directory that constitutes it being valid?

我在OS X上使用Qt编写了一个应用程序。已安装的SDK自动安装为我不想要的框架。所以我从Qt git存储库克隆了他们的最新版本,并从源代码构建它作为静态库。我希望它使用那些静态库而不是框架进行编译,但是在设置Qt版本/路径的首选项中,无论我指向它的路径是什么,都说它不是有效的Qt目录。在qt目录中必须包含什么才能使其有效?

2 个解决方案

#1


I'm closing this, The problem was installing on OSX I needed to declare -no-framework when running configure.

我正在关闭这个,问题是在OSX上安装我需要在运行configure时声明-no-framework。

#2


Some tips;

  • Install into a path that doesn't contain spaces
  • 安装到不包含空格的路径中

  • Use -prefix $PWD from the current path, and set the PATH, INCLUDE and LIB env variables appropriately - this makes it possible to have multiple Qt builds, e.g. multiple shadow builds from one source directory
  • 从当前路径使用-prefix $ PWD,并适当地设置PATH,INCLUDE和LIB env变量 - 这使得可以有多个Qt构建,例如,从一个源目录构建多个阴影

  • Don't do static configure - it makes using plugins difficult, and assuming you use LGPL you have to ship the .o files.
  • 不要进行静态配置 - 这会使插件变得困难,并且假设您使用LGPL,则必须提供.o文件。

#1


I'm closing this, The problem was installing on OSX I needed to declare -no-framework when running configure.

我正在关闭这个,问题是在OSX上安装我需要在运行configure时声明-no-framework。

#2


Some tips;

  • Install into a path that doesn't contain spaces
  • 安装到不包含空格的路径中

  • Use -prefix $PWD from the current path, and set the PATH, INCLUDE and LIB env variables appropriately - this makes it possible to have multiple Qt builds, e.g. multiple shadow builds from one source directory
  • 从当前路径使用-prefix $ PWD,并适当地设置PATH,INCLUDE和LIB env变量 - 这使得可以有多个Qt构建,例如,从一个源目录构建多个阴影

  • Don't do static configure - it makes using plugins difficult, and assuming you use LGPL you have to ship the .o files.
  • 不要进行静态配置 - 这会使插件变得困难,并且假设您使用LGPL,则必须提供.o文件。