5

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?

Daniel Hedberg
  • 5,677
  • 4
  • 36
  • 61
mans
  • 17,104
  • 45
  • 172
  • 321

2 Answers2

2

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

Daniel Hedberg
  • 5,677
  • 4
  • 36
  • 61
  • Thanks, You are right, it is using qt and probably I did not setup VS correctly. Where can I find information on how to setup Vs2012 for QT development and a hello world application which would check if VS setting is correct? I dowloaded QT 4.8 and installed it on my system, but I am not sure that VS is configured correctly. – mans Feb 26 '13 at 09:31
  • Follow the link in the answer and download the Visual Studio Add-in found under the "Other downloads" section. Once installed you can now create Qt projects if you click File->New->Project in VS. You will also find a Qt menu in Visual Studio where you can configure various options and project settings. For a simple Qt Hello World application, take a look here: http://qt-project.org/doc/qt-4.8/gettingstartedqt.html – Daniel Hedberg Feb 26 '13 at 09:56
  • I used methods stated in this post (http://stackoverflow.com/questions/12113400/compiling-qt-4-8-x-for-visual-studio-2012) to compile QT with VS2012. I tried to installthe VS add in, but the addin for qt 4.x is not working with VS 2012. it seems that qt 5 has a add in for VS2012. What is the difference between QT 5 and QT 4.x? Are they backward compaitible? My project was compiled with qt 4.7. – mans Feb 26 '13 at 21:47
  • Thanks, I managed to go one step forward and now I am getting error that is not found. Is it part of QT? also it can not find . I belve they both related to the same library. – mans Feb 27 '13 at 14:08
0

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.

Robson
  • 916
  • 5
  • 22