mans
mans

Reputation: 18168

Cannot build a C++ project

I am buidling a C++ project that I got from previous developer. When I try to compile it, I am getting this eror (I am using VS2012 Professional):

 \bin\rcc.exe -name resources resources.qrc -o debug\qrc_resources.cpp
 1>  Moc'ing aboutdialog.h...
 1>  The system cannot find the path specified.
 1>  Moc'ing action.h...
 1>  UIC aboutdialog.ui
 1>  The system cannot find the path specified.
 1>  UIC mainwindow.ui
 1>  The system cannot find the path specified.
 1>  RCC resources.qrc
 1>  The system cannot find the path specified.
 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(172,5): error MSB6006: "cmd.exe" exited with code 3.
 1>Done executing task "CustomBuild" -- FAILED.
 1>Done building target "CustomBuild" in project "sv.vcxproj" -- FAILED.

What is the problem and how can I fix it?

Upvotes: 5

Views: 8232

Answers (2)

Robson
Robson

Reputation: 926

I had the same problem,but my scenario was a little bit different:

  1. VS2015 (QT plugin installed)
  2. QT SDK installed and configured

This problem happened to me because I did a "git clean -fdx" on my solution folder and this deleted all the moc files because they were added to the gitignore.

To regenerate the MOC files I had to:

  1. close VS2015
  2. reopen the solution
  3. rebuild

After doing this the moc files got regenerated and I can correctly build, but the application doesn't start.

Upvotes: 0

Daniel Hedberg
Daniel Hedberg

Reputation: 5817

The project is using Custom Build Steps that depend on the Qt library and its tools. You need to at least download and install Qt (most likely version 4.8, Qt 5 was just released), and maybe also the Qt add-on that is available for Visual C++.

http://qt-project.org/downloads

Upvotes: 2

Related Questions