Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
Newbie:cannot compile - moc'ing error
error i got under visual studio 2005
Error 1 error PRJ0019: A tool returned an error code from "Moc'ing addressbook.h..." AddressBook
After installing qt visual studio integration, setup build path(C:\Program Files\Trolltech\Qt VS Integration\bin), i cannot compile the gettign started sample which i copied from C:\Program Files\Trolltech\Qt VS Integration\samples\AddressBook
what gives?
thanks.
RE: Newbie:cannot compile - moc'ing error
I have the same message in Visual Studio 2003.
But general information about real problem localized in "Output" tab. In my case it is following:
moc: Invalid argument
Usage: moc [options] <header-file> -o file Write output to file rather than stdout -f[file] Force #include, optional file name -p path Path prefix for included file -i Do not generate an #include statement -k Do not stop on errors -nw Do not display warnings -v Display version of moc
Project : error PRJ0019: A tool returned an error code from "Moc'ing taskedit.h..."
I found, visual studio change parameters of command line in common build tools section. It add c++ compiler parameters in moc-compiler like following
$(QTDIR)\bin\moc.exe -DQT_NO_DEBUG -D_WINDOWS -DUNICODE -DWIN32 -DQT_DLL -DQT_THREAD_SUPPORT -D_DEBUG -I"$(QTDIR)\include" "taskedit.h" -o ".moc\moc_taskedit.cpp"
instead of $(QTDIR)\bin\moc.exe "taskedit.h" -o ".moc\moc_taskedit.cpp"
i have exactly the same problem, but couldn't find where to change that command line with visual 2005.. Someone could precise me ?
thanks !
ok i found it here :
right-click on the ui_file.h > properties
writing "public signals:" rather than just "signals:" in the header file will cause this to occur as well.