Saturday, July 5th 2008, 4:57am UTC+1

You are not logged in.

  • Login
  • Register

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.

1

Wednesday, May 31st 2006, 12:22pm

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.
  • Go to the top of the page

2

Tuesday, June 6th 2006, 9:16am

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"
  • Go to the top of the page

totem

Beginner

3

Thursday, February 21st 2008, 9:32am

i have exactly the same problem, but couldn't find where to change that command line with visual 2005.. Someone could precise me ?

thanks !
  • Go to the top of the page

totem

Beginner

4

Thursday, February 21st 2008, 10:34am

ok i found it here :
right-click on the ui_file.h > properties
  • Go to the top of the page

agallers11

Beginner

Posts: 53

Location: MD, US

Occupation: Programmer

5

Sunday, February 24th 2008, 10:58pm

writing "public signals:" rather than just "signals:" in the header file will cause this to occur as well.
  • Go to the top of the page

Rate this thread