我正在尝试使用以下命令在 Windows 上构建 Qt:
configure -static -opensource -no-webkit -no-qt3support -no-audio-backend -no-exceptions -no-opengl -no-phonon -phonon-backend
我得到这个错误:
Unable to detect the platform from environment. Use -platform command lineargument
但是我不知道“-platform”参数的不同可能值是什么。我试过“win32”和“windows”,但没有一个是正确的。我找不到任何列出可能值的引用。有人知道我需要为 Windows 7(使用 Qt Creator 开发)添加什么吗?
最佳答案
打开 qt 目录中的 mkspecs
文件夹。在那里你可以看到多个文件夹。此文件夹的名称是 -platform
开关的值。
例如,您可以使用 win32-msvc
。 msvc
表示使用MS Visual Studio 编译器构建qt。
https://stackoverflow.com/questions/5211188/