Qt Visual Studio Moc Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about
Qt Moc File Not Generated Visual Studio
hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges qt moc files Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each
Moc'ing Cannot Find Path
other. Join them; it only takes a minute: Sign up Generating MOC for new QOBJECT files in visual studio 2010 up vote 2 down vote favorite I created a project using qmake and it automatically generated moc files for qt creator moc file not generated classes that inherit QObject either directly or indirectly. However, if I add a new class that inherits the QObject the QT plugin doesn't generate MOC files during the build process. What settings should I tweak so that I can do this automatically each time I add a new QObject file? c++ visual-studio-2010 qt user-interface share|improve this question asked Jun 1 '14 at 20:33 jaykumarark 70731837 add a comment| 1 Answer 1 active oldest votes up vote 1 down qmake moc vote accepted If your custom classes are not moc'ed automatically, you could have forgotten to add a Q_OBJECT macro in class declarations or to put QObject as the first class that is inherited from in case of multiple inheritance (the order of classes from which your derived class inherits matters). If it's not your case, you may want to read this: http://truth2.wordpress.com/2010/09/04/custom-build-rules-for-qt-under-visual-studio-2010/ BTW: QT versions have their nuances and thus it is helpful if you inform about which version you use. share|improve this answer edited Jun 1 '14 at 21:46 answered Jun 1 '14 at 21:37 user3564091 48527 I'm using Qt 4.8.6. I forgot to mention. But that linked worked. After adding the custom build rules for those files, it works fine. Thanks. –jaykumarark Jun 1 '14 at 22:41 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged c++ visual-studio-2010 qt user-interface or ask your own question. asked 2 years ago viewed 3805 times active 2 years ago Blog Stack Overflow Podcast #92 - The Guerilla Guide to Interviewing Related 5Compile
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow
Meta Object Compiler
the company Business Learn more about hiring developers or posting ads with us Stack visual studio qt plugin Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of
Q_object Macro
6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Qt moc failure without an error message up vote 1 down vote favorite So I'm pretty new http://stackoverflow.com/questions/23984211/generating-moc-for-new-qobject-files-in-visual-studio-2010 to Qt, and I've just inherited a project from someone else who is also new to Qt. He isn't around this week btw. We are using Visual Studio 2008, and have the latest version of Qt installed(4.6.2). The project builds on my coworker's machine fine, and I can get the project from svn and build it directly. But under any other circumstances it refuses to build on my machine, and it doesn't http://stackoverflow.com/questions/2631489/qt-moc-failure-without-an-error-message give me much of an explanation why. Even if I just do a 'build clean' and then a 'build' it doesn't work. Any slight modification will make it fail. When I try to build the entire project I get the error message: 1>Moc'ing MatrixTypeInterface.h... 1>moc: Cannot create .\GeneratedFiles\Debug\moc_MatrixTypeInterface.cpp;.\GeneratedFiles\Debug\moc_matrixtypeinterface.cpp 1>Project : error PRJ0019: A tool returned an error code from "Moc'ing MatrixTypeInterface.h..." The moc tool doesn't give any sort of error message as to why it isn't working, and I wasted most of yesterday trying to figure out why. I got the command that VS was using to call moc, and I entered in the command line myself. It didn't write anything to the screen. Any ideas? c++ visual-studio-2008 qt share|improve this question asked Apr 13 '10 at 16:50 Robert Parker 60551014 add a comment| 4 Answers 4 active oldest votes up vote 1 down vote It's most likely a filesystem error, you probably don't have a "GeneratedFiles" folder or don't have the correct permissions on it. I have had issues where different versions of the moc and the add-in use "Generated" or "Generated Files" or "GeneratedFiles" for the folder. Check the settings on all the build steps. share|improve this answer answered Apr 13 '10 at 16:57 Martin Beckett 70.2k15144221 All of the
enable C++ https://vperi.com/2012/04/23/automatic-mocing-in-visual-studio/ extensions. moc.exe runs on Qt derived headers which generates an additional .cpp file that enable Qt extensions such as reflection, signals, etc. For Qt http://www.danielgm.net/cc/forum/viewtopic.php?t=1425 projects on Windows, I prefer Visual Studio's IDE and msbuild over Qt's qmake. Although Qt provides a VS addin to visual studio create and manage Qt projects from within VS, the default workflow can be rather cumbersome and I find myself editing .vcxproj files for each new header. To automate the process, I use a VS properties (.props) file to batch moc commands. It qt moc file includes a target that runs before the ClCompile target.
Build error - MS Visual Studio Express 11 2012 x64, QT5 If you are allergic to bug trackers, you can post here any remarks, issues and potential bugs you encounter Post Reply Print view Search Advanced search 4 posts • Page 1 of 1 PetkoSmetko Posts: 6 Joined: Tue Oct 20, 2015 9:27 am Build error - MS Visual Studio Express 11 2012 x64, QT5 Quote Postby PetkoSmetko » Tue Oct 20, 2015 9:45 am HiI am trying to build CC only.When I run 'ALL_BUILD' then I have got this error:Code: Select allError 1 error : process for C:/Users/admin/Documents/GitHub/CC/trunk/build/libs/qCC_db/moc_ccClipBox.cpp failed: C:\Users\admin\Documents\GitHub\CC\trunk\build\libs\qCC_db\AUTOGEN QCC_DB_LIB
Error 2 error : process for C:/Users/admin/Documents/GitHub/CC/trunk/build/libs/qCC_db/moc_ccOctree.cpp failed: C:\Users\admin\Documents\GitHub\CC\trunk\build\libs\qCC_db\AUTOGEN QCC_DB_LIB
Error 3 error : process for C:/Users/admin/Documents/GitHub/CC/trunk/build/libs/qCC_db/moc_ccProgressDialog.cpp failed: C:\Users\admin\Documents\GitHub\CC\trunk\build\libs\qCC_db\AUTOGEN QCC_DB_LIB
Error 4 error MSB3073: The command "setlocal
cd C:\Users\admin\Documents\GitHub\CC\trunk\build\libs\qCC_db
if %errorlevel% neq 0 goto :cmEnd
C:
if %errorlevel% neq 0 goto :cmEnd
"C:\Program Files (x86)\CMake\bin\cmake.exe" -E cmake_autogen C:/Users/admin/Documents/GitHub/CC/trunk/build/libs/qCC_db/CMakeFiles/QCC_DB_LIB_automoc.dir/ Debug
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
:VCEnd" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets 124 5 QCC_DB_LIBand so one.I could see that this files are missing on my HDD.Here is my CMake configuration:I am trying to build only basic CC without any unnecessary features.Software configuration:Windows 7 x64 - in VirtualboxCMake v3.3.2QT 5.5.1MS Visual Studio Express 11 2012 x64CC s