PDA

View Full Version : failed to build;is it SP1 problem?


Masih
15th May 2007, 04:34
Hi guys,

I am having a problem building Qt4.2 commercial version on VS2003 and VS2005. What is this problem? How can i solve it?

on VS2005============>

1>Moc'ing test1.h...
1>'C:\Qt\4.2.0' is not recognized as an internal or external command,
1>operable program or batch file.
1>Project : error PRJ0019: A tool returned an error code from "Moc'ing test1.h..."
1>Build log was saved at "file://c:\Documents and Settings\****\My Documents\Visual Studio 2005\LearningQtTut\test1\test1\Debug\BuildLog.htm"
1>test1 - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========:(


on VS2003============>

------ Build started: Project: test3, Configuration: Debug Win32 ------

Moc'ing test3.h...
'C:\Qt\4.2.0' is not recognized as an internal or external command,
operable program or batch file.
Project : error PRJ0019: A tool returned an error code from "Moc'ing test3.h..."

Build log was saved at "file://c:\Documents and Settings\****\My Documents\Visual Studio Projects\LearnQtTut\test3\Debug\BuildLog.htm"
test3 - 1 error(s), 0 warning(s)


---------------------- Done ----------------------

Build: 0 succeeded, 1 failed, 0 skipped


----------------------------------------------------------------------------------------------

thx,

marcel
15th May 2007, 06:18
You should take a look at test1.h's properties nad see if it's custom tool is ok.
Should be C:\Qt\4.2.0\moc.exe.
Seems like you're missing the executable.

Have you set QTDIR and QTDIR\bin in path?

wysota
15th May 2007, 11:11
Are you by any chance using a directory which contains spaces in its path? Did you run configure as the first stage of compilation?

Masih
15th May 2007, 20:48
To Marcel:

I have no idea what you meant with test1.h properties. can you give me more information?

Well! As you said, those were not in the path. I set them to the path. But I got the same error.
They were just the same.

jacek
15th May 2007, 21:08
@Masih:
There's an "Edit" button which you can use to edit your post, instead of posting another two posts with the modified content.

Masih
15th May 2007, 21:13
Are you by any chance using a directory which contains spaces in its path? Did you run configure as the first stage of compilation?

no. i simply used the Qt integration packages. But something interesting is that using VS2005 and VS2003 both i get the message
1>Moc'ing test1.h...
1>'C:\Qt\4.2.0' is not recognized as an internal or external command,
1>operable program or batch file.
1>Project : error PRJ0019: A tool returned an error code from "Moc'ing test1.h..."
1>Build log was saved at "file://c:\Documents and Settings\***\My Documents\Visual Studio 2005\LearningQtTut\test1\test1\Debug\BuildLog.htm"
1>test1 - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

while for VS2005 i have another folder named C:\Qt\4.2.0(MSVC.NET2005) and not C:\Qt\4.2.0

well, for VS2003 i have this folder though (C:\Qt\4.2.0)

Masih
15th May 2007, 21:15
@Masih:
There's an "Edit" button which you can use to edit your post, instead of posting another two posts with the modified content.
Sorry for that and thanks for the tip.

marcel
16th May 2007, 00:39
I mean locate a header that you are sure needs to be moc'ed, right click it and click "Properties".

There you should have( my file is 3.h):

1. General: No, Custom build tool
2. Custom Build Step:
- Command line:

$(QTDIR)\bin\moc.exe -DUNICODE -DWIN32 -DQT_THREAD_SUPPORT -DQT_CORE_LIB -DQT_GUI_LIB -I".\GeneratedFiles" -I"$(QTDIR)\include" -I".\GeneratedFiles\$(ConfigurationName)" -I"." -I"$(QTDIR)\include\QtCore" -I"$(QTDIR)\include\QtGui" ".\3.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_3.cpp"

- Outputs:

".\GeneratedFiles\$(ConfigurationName)\moc_3.cpp"

- Additional dependencies:

$(QTDIR)\bin\moc.exe;.\3.h


Regards

Masih
16th May 2007, 19:07
I mean locate a header that you are sure needs to be moc'ed, right click it and click "Properties".

There you should have( my file is 3.h):

1. General: No, Custom build tool
2. Custom Build Step:
- Command line:

- Outputs:

".\GeneratedFiles\$(ConfigurationName)\moc_3.cpp"

- Additional dependencies:

$(QTDIR)\bin\moc.exe;.\3.h


Regards


@ Marcel: the problem is that I am not using the open source edition. I am just trying to install the commercial/educational edition of that on my PC at home. supposedly I should be able to build and run the programs with just clicking the pretty green button in the VS IDE:crying: .
I think I am installing the package uncorrectly. After your post I uninstalled all the Qt versions from my PC and tried to clean the registery from trolltech things.
then I just installed VS2005 integration.
then i made a test program for VS2005/Qt and another one for VS2003/Qt. well niether of them worked this time again! but the difference was that I received different building errors. (I am not at home so I can not send the two error reports right now, but I will do it as soon as possible!)
I hoep somebody can help me to solve this problem...... it is becoming an obssesion for an ignorant Qt beginner:eek:

It is weird because the computer I am having at work and Qt was working fine on it suddenly has been making problems as well.... see this error also please.

1>------ Build started: Project: test, Configuration: Debug Win32 ------
1>Rcc'ing test.qrc...
1>C:\Qt\4.2.2\bin\rcc.exe -name "test" -no-compress ".\test.qrc" -o .\GeneratedFiles\qrc_test.cpp
1>Uic'ing test.ui...
1>Creating windows resources...
1>Moc'ing test.h...
1>Compiling...
1>test.cpp
1>c:\qt\4.2.2\include\qtcore\../../src/corelib/tools/qmap.h(906) : error C2244: 'QMultiMap<Key,T>::replace' : unable to match function definition to an existing declaration
1> c:\qt\4.2.2\include\qtcore\../../src/corelib/tools/qmap.h(891) : see declaration of 'QMultiMap<Key,T>::replace'
1> definition
1> 'QMap<aKey,aT>::iterator QMultiMap<Key,T>::replace(const Key &,const T &)'
1> existing declarations
1> 'QMap<aKey,aT>::iterator QMultiMap<Key,T>::replace(const Key &,const T &)'
1>c:\qt\4.2.2\include\qtcore\../../src/corelib/tools/qmap.h(910) : error C2244: 'QMultiMap<Key,T>::insert' : unable to match function definition to an existing declaration
1> c:\qt\4.2.2\include\qtcore\../../src/corelib/tools/qmap.h(892) : see declaration of 'QMultiMap<Key,T>::insert'
1> definition
1> 'QMap<aKey,aT>::iterator QMultiMap<Key,T>::insert(const Key &,const T &)'
1> existing declarations
1> 'QMap<aKey,aT>::iterator QMultiMap<Key,T>::insert(const Key &,const T &)'
1>main.cpp
1>c:\qt\4.2.2\include\qtcore\../../src/corelib/tools/qmap.h(906) : error C2244: 'QMultiMap<Key,T>::replace' : unable to match function definition to an existing declaration
1> c:\qt\4.2.2\include\qtcore\../../src/corelib/tools/qmap.h(891) : see declaration of 'QMultiMap<Key,T>::replace'
1> definition
1> 'QMap<aKey,aT>::iterator QMultiMap<Key,T>::replace(const Key &,const T &)'
1> existing declarations
1> 'QMap<aKey,aT>::iterator QMultiMap<Key,T>::replace(const Key &,const T &)'
1>c:\qt\4.2.2\include\qtcore\../../src/corelib/tools/qmap.h(910) : error C2244: 'QMultiMap<Key,T>::insert' : unable to match function definition to an existing declaration
1> c:\qt\4.2.2\include\qtcore\../../src/corelib/tools/qmap.h(892) : see declaration of 'QMultiMap<Key,T>::insert'
1> definition
1> 'QMap<aKey,aT>::iterator QMultiMap<Key,T>::insert(const Key &,const T &)'
1> existing declarations
1> 'QMap<aKey,aT>::iterator QMultiMap<Key,T>::insert(const Key &,const T &)'
1>Generating Code...
1>Build log was saved at "file://c:\Dokumente und Einstellungen\Ali\Eigene Dateien\Visual Studio 2005\QtTut7\test\test\Debug\BuildLog.htm"
1>test - 4 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

what is wrong!? am i sending negative energy to the Qt installations on computers:crying:

Thnx for yr time,
Regards

Masih
16th May 2007, 19:18
Are you by any chance using a directory which contains spaces in its path? Did you run configure as the first stage of compilation?

well, there were no spaces in the directory path. and i ran the configure as well. I really don't know what to do with installing a working Qt which is becoming like obsession.

regards

marcel
16th May 2007, 19:21
I was using Qt Commercial for VS2003 also.
As far as I know there are different versions of Qt Commercial- for VS2003 and for VS2005. Are you using the same version for both?
Also, how did you install VS 2003 and 2005 together? They are known to cause problems.

Regards

Masih
16th May 2007, 19:24
@ Marcel: the problem is that I am not using the open source edition. I am just trying to install the commercial/educational edition of that on my PC at home. supposedly I should be able to build and run the programs with just clicking the pretty green button in the VS IDE:crying: .
I think I am installing the package uncorrectly. After your post I uninstalled all the Qt versions from my PC and tried to clean the registery from trolltech things.
then I just installed VS2005 integration.
then i made a test program for VS2005/Qt and another one for VS2003/Qt. well niether of them worked this time again! but the difference was that I received different building errors. (I am not at home so I can not send the two error reports right now, but I will do it as soon as possible!)
I hoep somebody can help me to solve this problem...... it is becoming an obssesion for an ignorant Qt beginner:eek:

It is weird because the computer I am having at work and Qt was working fine on it suddenly has been making problems as well.... see this error also please.

1>------ Build started: Project: test, Configuration: Debug Win32 ------
1>Rcc'ing test.qrc...
1>C:\Qt\4.2.2\bin\rcc.exe -name "test" -no-compress ".\test.qrc" -o .\GeneratedFiles\qrc_test.cpp
1>Uic'ing test.ui...
1>Creating windows resources...
1>Moc'ing test.h...
1>Compiling...
1>test.cpp
1>c:\qt\4.2.2\include\qtcore\../../src/corelib/tools/qmap.h(906) : error C2244: 'QMultiMap<Key,T>::replace' : unable to match function definition to an existing declaration
1> c:\qt\4.2.2\include\qtcore\../../src/corelib/tools/qmap.h(891) : see declaration of 'QMultiMap<Key,T>::replace'
1> definition
1> 'QMap<aKey,aT>::iterator QMultiMap<Key,T>::replace(const Key &,const T &)'
1> existing declarations
1> 'QMap<aKey,aT>::iterator QMultiMap<Key,T>::replace(const Key &,const T &)'
1>c:\qt\4.2.2\include\qtcore\../../src/corelib/tools/qmap.h(910) : error C2244: 'QMultiMap<Key,T>::insert' : unable to match function definition to an existing declaration
1> c:\qt\4.2.2\include\qtcore\../../src/corelib/tools/qmap.h(892) : see declaration of 'QMultiMap<Key,T>::insert'
1> definition
1> 'QMap<aKey,aT>::iterator QMultiMap<Key,T>::insert(const Key &,const T &)'
1> existing declarations
1> 'QMap<aKey,aT>::iterator QMultiMap<Key,T>::insert(const Key &,const T &)'
1>main.cpp
1>c:\qt\4.2.2\include\qtcore\../../src/corelib/tools/qmap.h(906) : error C2244: 'QMultiMap<Key,T>::replace' : unable to match function definition to an existing declaration
1> c:\qt\4.2.2\include\qtcore\../../src/corelib/tools/qmap.h(891) : see declaration of 'QMultiMap<Key,T>::replace'
1> definition
1> 'QMap<aKey,aT>::iterator QMultiMap<Key,T>::replace(const Key &,const T &)'
1> existing declarations
1> 'QMap<aKey,aT>::iterator QMultiMap<Key,T>::replace(const Key &,const T &)'
1>c:\qt\4.2.2\include\qtcore\../../src/corelib/tools/qmap.h(910) : error C2244: 'QMultiMap<Key,T>::insert' : unable to match function definition to an existing declaration
1> c:\qt\4.2.2\include\qtcore\../../src/corelib/tools/qmap.h(892) : see declaration of 'QMultiMap<Key,T>::insert'
1> definition
1> 'QMap<aKey,aT>::iterator QMultiMap<Key,T>::insert(const Key &,const T &)'
1> existing declarations
1> 'QMap<aKey,aT>::iterator QMultiMap<Key,T>::insert(const Key &,const T &)'
1>Generating Code...
1>Build log was saved at "file://c:\Dokumente und Einstellungen\Ali\Eigene Dateien\Visual Studio 2005\QtTut7\test\test\Debug\BuildLog.htm"
1>test - 4 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

what is wrong!? am i sending negative energy to the Qt installations on computers:crying:

Thnx for yr time,
Regards

supposedly the latter problem is the SP1 issue. seems somebody has done something with my PC but still the first question is remained.:o

Masih
16th May 2007, 19:30
I was using Qt Commercial for VS2003 also.
As far as I know there are different versions of Qt Commercial- for VS2003 and for VS2005. Are you using the same version for both?
Also, how did you install VS 2003 and 2005 together? They are known to cause problems.

Regards

Akhkhkh! I asked this issue before and what they told me was not be so concenred about possible conflicts between 2005 and 2003.

in the first time, i used different installations. One for Qt on 2005 and another for Qt on 2003 and used integration package for both of them. ( problem occured..)
then I uninstalled all Qt things, tested the VS2003 and VS2005 and they were working fine. Then I used Qt for 2005 installation package and then the integration package... it didn't work on VS2005 again...
But when I opened the VS2003 to check , I saw that Qt is also integrated on VS2003!!!!!
Well! maybe the next step should be uninstalling VS2003 and testing that again... what do you say? any other hint?

Bests
Masih

Masih
17th May 2007, 03:25
Hi there!
It's me again!
I think I managed to do it!:p
I was receiving this moc'ing error and the I saw this link below:
http://lists.trolltech.com/qt-interest/2006-12/thread00000-0.html

even though at the beginning of installing the Addson package I got a warning message that we detected another integration package installed and they will have conflicts and as far as I had nothing to lose:p I installed it and it is working now. At least it is compiling.

Thank you guys:o