当我试图运行一个qwt示例时,我会遇到以下错误,在Visual中,示波器示例要准确地添加进来。将出现构建错误,并将显示以下行:
1>------ Build started: Project: oscilloscope, Configuration: Debug Win32 ------
1>Build started 3/1/2014 4:57:18 PM.
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(298,5): warning MSB8004: Intermediate Directory does not end with a trailing slash. This build instance will add the slash as it is required to allow proper evaluation of the Intermediate Directory.
1>InitializeBuildStatus:
1> Touching "Win32\Debug\oscilloscope.unsuccessfulbuild".
1>CustomBuild:
1> Moc'ing knob.h...
1> The syntax of the command is incorrect.
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error MSB6006: "cmd.exe" exited with code 255.
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.05
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========有人知道为什么吗?不确定此问题是否相关,但当我从Visual打开qt项目时,来自“in”的输出显示:
--- (Import): Generating new project of oscilloscope.pro file
--- (qmake) : Using: c:\qt\qt5.1.1\5.1.1\msvc2010\bin\qmake
--- (qmake) : Working Directory: C:\qwt-6.1.0\examples\oscilloscope
--- (qmake) : Arguments: -tp vc "oscilloscope.pro" -o "oscilloscope.vcxproj" QMAKE_INCDIR_QT=$(QTDIR)\include QMAKE_LIBDIR=$(QTDIR)\lib QMAKE_MOC=$(QTDIR)\bin\moc.exe QMAKE_QMAKE=$(QTDIR)\bin\qmake.exe
--- (qmake) : Exit Code: 0
Could not parse QTDIR from project file oscilloscope.vcxproj.
--- (Import): Added oscilloscope.vcxproj to Solution
=== Update uic steps ===
=== 0 uic steps updated. ===
=== Update rcc steps ===
=== 0 rcc steps updated. ===“无法从项目文件oscilloscope.vcxproj解析QTDIR”是否是造成这一问题的原因?
所有示例都能够在qt创建者本身中运行。只有当我尝试从Visual运行时,才会出现此问题。
我已经在qt创建者和MSVC的qt网站上找到了正确的安装指南。知道为什么会出现这个问题吗?请帮帮忙。如有任何建议或建议,将不胜感激。
发布于 2014-01-03 09:37:33
在使用子目录时,Visual外接程序中有一个错误。在导入之前,尝试在qwt.pro文件中更改这一点:
SUBDIRS = \
src \
textengines至:
SUBDIRS = src textengines然后,再做一次导入。还可以使用Visual外接程序的固定版本。
在这里,您可以在Qt bug跟踪器上找到相应的问题:
发布于 2014-01-20 10:29:50
我通过将这一行删除到qwtbuild.pri文件中解决了这个错误:
CONFIG += silent现在,qwt库的所有示例都运行良好!
发布于 2016-07-15 09:45:27
尝试删除%40echo moc .* &&中的qwt.vcxproj qwt_designer_plugin.vcxproj。
在此之后,您应该重新加载项目。
我正在使用VS2013 Qwt6.1.2Qt5.6.0。
https://stackoverflow.com/questions/20900003
复制相似问题