我可以构建一个项目并让它在我的计算机上正常运行但是当我在不同的计算机上运行它时它不会工作。如何使用Qt构建它以便包含所有文件库?
我关注此http://doc.qt.digia.com/4.7/deployment-mac.html 但它似乎没有用。当我运行qmake时,它只打印出像
那样的指令Mode: -project Put qmake into project file generation mode In this mode qmake interprets files as files to be built, defaults to *.c; *.ui; *.y; *.l; *.ts; *.xlf; *.qrc; *.h; *.hpp; *.hh; *.hxx; *.H; *.cpp; *.cc; *.cxx; *.C Note: The created .pro file probably will need to be edited. For example add the QT variable to specify what modules are required. -makefile Put qmake into makefile generation mode (default) In this mode qmake interprets files as project files to be processed, if skipped qmake will try to find a project file in your current working directory
我在应用的发布目录中运行它。我做错了什么?
答案 0 :(得分:1)
默认情况下,Mac OS X上的qmake会生成(已弃用)XCode项目文件。如果要生成makefile,则需要使用参数运行qmake:
qmake -spec macx-g++
然后你可以打电话给make。但是,如果要部署应用程序,则需要运行QTDIR / bin /目录中的macdeployqt