简体   繁体   English

nmake无法工作 - Qt

[英]nmake Won't Work - Qt

I am trying to deploy my project(built with Qt Creator) into a single, static executable(Windows). 我正在尝试将我的项目(使用Qt Creator构建)部署到单个静态可执行文件(Windows)中。 I am having trouble doing this, even though I feel like I am following the Qt tutorial exactly. 我很难做到这一点,即使我觉得我正在完全遵循Qt教程。

The tutorial I am following: http://qt-project.org/doc/qt-4.8/deployment-windows.html 我关注的教程: http//qt-project.org/doc/qt-4.8/deployment-windows.html

First, I open the Qt Command Promt, and enter 'configure -static'. 首先,我打开Qt Command Promt,然后输入'configure -static'。 Just to ensure I am doing EVERYTHING correct, I am even showing the command prompt I am using. 只是为了确保我做的一切正确,我甚至显示我正在使用的命令提示符。

I go through the 'configure' steps, and this is my output. 我通过'configure'步骤,这是我的输出。

After entering the 'configure -static' command, I get this as the output. 输入'configure -static'命令后,我将其作为输出。 (put on Pastie to keep this clean). (穿上Pastie保持干净)。

http://pastie.org/3580144 http://pastie.org/3580144

I then enter 'nmake sub-src', and get this as the output: 然后我输入'nmake sub-src',并将其作为输出:

C:\Qt\4.8.0>nmake sub-src

Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation.  All rights reserved.

    cd ..\..\src\tools\bootstrap\ && c:\Qt\4.8.0\bin\qmake.exe \src\tools\bootstrap\bootstrap.pro -o Makefile
Cannot find file: \src\tools\bootstrap\bootstrap.pro.
NMAKE : fatal error U1077: 'cd' : return code '0x2' Stop.

C:\Qt\4.8.0>

I get this same output even if I just command 'nmake'. 即使我只是命令'nmake',我也得到相同的输出。 I have the Qt SDK installed, and I have no idea what to do at this point as I've Googled everything. 我已经安装了Qt SDK,而且我不知道该做什么,因为我已经Google搜索了所有内容。 Thanks for any help, Hetelek. 感谢任何帮助,Hetelek。

It's that leading slash on the file path - it makes the file path "absolute." 它是在文件路径上引导斜杠 - 它使文件路径“绝对”。 SO nmake is looking for the file: SO nmake正在寻找文件:

C:\\src\\tools\\bootstrap\\bootstrap.pro

but your file is actually saved as: 但您的文件实际上保存为:

C:\\Qt\\4.8.0\\src\\tools\\bootstrap\\bootstrap.pro

Now, I'm not sure how to configure nmake to use the right path, but that's your problem right there. 现在,我不确定如何配置nmake以使用正确的路径,但那就是你的问题。 And if all else fails, you can always move your src folder to the root of your C drive so it's where nmake expects it to be. 如果所有其他方法都失败了,您可以随时将src文件夹移动到C驱动器的根目录,这样就是nmake所期望的。

Hope that helps! 希望有所帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM