Question

I face the following error when trying to run a qwt example, the oscilloscope example to be exact in Visual Studio QT add in. There will be build errors, and the following lines will be shown:

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 ==========

Do anybody have any idea why? Not sure if this problem is related, but when I open qt project from Visual Studio, the output from the "Qt Visual Studio Add in" shows:

--- (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. ===

Could the "could not parse QTDIR from project file oscilloscope.vcxproj" be the cause of this problem?

All the examples are able to run in qt creator itself. This problem only occurs when I try to run in from Visual Studio.

I have already ran through the proper installation guide found on the qwt website for both qt creator and MSVC. Any idea why this problem occurs? Please help. Any advice or suggestion will be greatly appreciated.

Was it helpful?

Solution

There was a bug in the Visual Studio add-in when using subdirs. Try to change this in the qwt.pro file before importing:

SUBDIRS = \ 
    src \
    textengines

to:

SUBDIRS = src textengines

Then, do the import again. You could also use a fixed version of the Visual Studio add-in.

Here you can find the corresponding issue on the Qt bug tracker:

Qt Visual Studio Add-in 1.1.0 doesn't parse QTDIR correctly in a project with SUBDIRs

OTHER TIPS

I solved this error by deleting this line into the qwtbuild.pri file:

CONFIG += silent

Now all the examples of qwt library are working well!

Try to delete the %40echo moc .* && in qwt.vcxproj qwt_designer_plugin.vcxproj.

After that, you should reload the projects.

I am using VS2013 Qwt6.1.2 Qt5.6.0.

I have the exact same problem using Visual Studio 2012, VS addin1.2.2, Qt 5.2, Qwt 6.1, when trying to compile the bode example. None of the above hints seem to help, in particular I don't see any multiline SUBDIRS in the .pro file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top