QT构建失败与NMAKE:致命错误U1077:'echo':返回代码'0x1' [英] QT build fails with NMAKE : fatal error U1077: 'echo' : return code '0x1'

查看:6602
本文介绍了QT构建失败与NMAKE:致命错误U1077:'echo':返回代码'0x1'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用QT和CMake构建Windows应用程序。当我运行我的CMakeLists.txt文件时,我得到以下警告:

I am using QT and CMake to build application for windows. When I run my CMakeLists.txt file I get the following warning:

CMake Warning at c:/Program Files/CMake 3.4/share/cmake-3.4/Modules/InstallRequiredSystemLibraries.cmake:343 (message):
  system runtime library file does not exist:
  'MSVC10_REDIST_DIR-NOTFOUND/x86/Microsoft.VC100.CRT/msvcp100.dll'
Call Stack (most recent call first):
  CMakeLists.txt:165 (INCLUDE)

CMake Warning at c:/Program Files/CMake 3.4/share/cmake-3.4/Modules/InstallRequiredSystemLibraries.cmake:343 (message):
  system runtime library file does not exist:
  'MSVC10_REDIST_DIR-NOTFOUND/x86/Microsoft.VC100.CRT/msvcr100.dll'
Call Stack (most recent call first):
  CMakeLists.txt:165 (INCLUDE)

href =http://stackoverflow.com/questions/10676676/cant-install-msvcp100-dll> post 与此警告相关,但不像该问题的海报我不是在写一个GUI应用程序。由于我是新的使用CMake我不知道如何使我的链接器标志正确。因为这只是一个警告在我的CMake我可以继续完成CMake无论如何。麻烦的是,当我尝试构建我的应用程序,我得到以下编译器错误:

I found a post related to this warning but unlike the poster of that question I am not writing a GUI application. As I am new to using CMake I don't know how to make my linker flags correct. As this is just a warning in my CMake I can go ahead an finish the CMake anyway. The trouble is when I try to build my application I get the following compiler error:

CMake Error: No Script specified for argument -P
NMAKE : fatal error U1077: 'echo' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
12:02:32: The process "C:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe" exited with code 2.
Error while building/deploying project openfls (kit: Desktop)
When executing step 'Make'

询问是如何做的警告,我得到当运行我的CMake导致编译器错误?如果是这样,我如何解决警告(编辑标志)?如果不是,重要的是解决警告(或者我可以忽略它),我应该怎么做以防止编译器错误?

What I am asking is how do the warning that I get when running my CMake leading to the compiler error? If so how do I resolve the warning (editing the flags)? If not is it important to address the warning (or can I just ignore it) and what should I be doing to prevent the compiler error?

推荐答案

我解决了我的cmake错误通过识别一些linux具体包括哪些窗口不知道该怎么做(关于CPACK的事情)。然而,这没有解决我在我尝试构建时遇到的错误,回答我的问题,两个是否相关。

I resolved my cmake error by identifying some linux specific includes which windows did not know what to do with (things relating to CPACK). This however did not resolve the errors I got when I tried to build, answering my question as to whether the two were related.

当我建设的问题是QT没有正确设置建立在这个系统上(图书馆的环境变量没有设置)。这在以前使用qmake的这台机器上构建之前没有问题,它使用了microsoft可视化编译器。因此,为了解决我的错误,我在QT以外手动运行我的cmake然后打开解决方案文件< a>在Visual C ++中。

The problem when I was building is that QT is not properly set up to build on this system (the environmental variables for libraries ect. were not set). This had not been a problem before building on this machine as previously using qmake it had used the microsoft visual compiler. So to resolve my error I ran my cmake manually outside of QT then opened the solution file in Visual C++.

这篇关于QT构建失败与NMAKE:致命错误U1077:'echo':返回代码'0x1'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆