Cannot create a project in C ++

I am creating a C ++ project that I received from a previous developer. When I try to compile it, I get this eror (I use 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 to fix it?

+4
source share
2 answers

The project uses custom build scripts, which depend on the Qt library and its tools. You need to at least download and install Qt (most likely version 4.8, Qt 5 has just been released), as well as possibly the Qt add-on available for Visual C ++.

http://qt-project.org/downloads

+2
source

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

  • VS2015 (QT plugin installed)
  • Installed and configured QT SDK

This problem happened to me because I made "git clean -fdx" in my solutions folder and it deleted all the moc files because they were added to gitignore.

To restore MOC files, I had to:

  • close VS2015
  • reopen solution
  • rebuild

After that, the moc files were restored and I can build correctly, but the application does not start.

0
source

All Articles