转载:http://lists.trolltech.com/qt-interest/2007-10/thread00075-0.html
Message 1 in thread
Subject: Moc error in Visual Studio
From: "Jim Bancroft" <babbaloo@xxxxxxxxxxx>
Date: Wed, 3 Oct 2007 14:52:59 -0700
Delivered-to: qt-interest@trolltech.com
List-help: <mailto:qt-interest-request@trolltech.com?subject=help>
List-post: <mailto:qt-interest@trolltech.com>
List-subscribe: <mailto:qt-interest-request@trolltech.com?subject=subscribe>
List-unsubscribe: <mailto:qt-interest-request@trolltech.com?subject=unsubscribe>
Resent-from: qt-interest@xxxxxxxxxxxxx
Resent-message-id: <hnBCb.A.yvH.-8ABHB@esparsett>
Resent-sender: qt-interest-request@xxxxxxxxxxxxx
To: qt-interest@xxxxxxxxxxxxx
Hi everyone,
This error I'm getting from VS 2005 is a little vague to me, would anyone
have an insight as to where to start? The main Qt project compiles but when
it comes time to moc, this appears:
Moc'ing TextureViewer.h
The system cannot find the path specifiied
'Project : error PRJ0019: A tool returned an error code from "Moc'ing
TextureViewer.h..."
Any starting points? I get this too, not sure if it's related to the above:
BSCMAKE: error Bk1506: cannot open file './Debug/DirectionVector.sbr: no
such file or directory
--
[ signature omitted ]
--------------------------------------------------------------------------------
Message 2 in thread
Subject: RE: Moc error in Visual Studio
From: "Ben Shaw" <ben.shaw@xxxxxxxxxx>
Date: Thu, 4 Oct 2007 13:34:13 +1000
Delivered-to: qt-interest@trolltech.com
Importance: Normal
List-help: <mailto:qt-interest-request@trolltech.com?subject=help>
List-post: <mailto:qt-interest@trolltech.com>
List-subscribe: <mailto:qt-interest-request@trolltech.com?subject=subscribe>
List-unsubscribe: <mailto:qt-interest-request@trolltech.com?subject=unsubscribe>
Resent-from: qt-interest@xxxxxxxxxxxxx
Resent-message-id: <rpuHf.A.OTC.UBGBHB@esparsett>
Resent-sender: qt-interest-request@xxxxxxxxxxxxx
Thread-index: AcgGB9gXgmt11/NvSrypN9hRgn5hPwALrVOQ
To: <qt-interest@xxxxxxxxxxxxx>
I have ran across this problem several times before and from what I can tell
and have been told by others the problem seems to come from having to long a
include path and VS somehow cropping it before sending to the MOC'er
I have found a couple of solutions:
1. Check your includes. Remove any that are unnescessary or repeated
2. Change your wokring directory to a location with a shorter file path
(i.e. work from C:/)
3. Manually Moc the file and see if you have any errors
%QTDIR%/bin/moc.exe -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT
-DTESTING_ENABLED -DTRACE_ON -D_DEBUG -D_X86 -DQT_DLL -DQT_GUI_LIB
-DQT_CORE_LIB -DQT_THREAD_SUPPORT "Interface/fileName.h" -o
"Intermediate/Debug/moc_fileName.cpp"
Check the custom build steps of the file in question. Make sure you have
the proper paths to your Qt installation setup in the Qt Addin and/or Qt
Integration for Visual Stdudio 2005.
PRJ0019 means there is an error for a custom build step/event, but it's
confusing, because you get it for syntax errors in your header files. To
see the error, you have to go to the Output window and look for the line
number, something like this:
PRJ0019
最新推荐文章于 2021-07-20 16:16:03 发布