Results 1 to 15 of 15

Thread: failed to build;is it SP1 problem?

  1. #1
    Join Date
    Apr 2007
    Posts
    33
    Thanks
    21
    Qt products
    Qt4
    Platforms
    Windows

    Question failed to build;is it SP1 problem?

    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,

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: failed to build;is it SP1 problem?

    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?

  3. The following user says thank you to marcel for this useful post:

    Masih (15th May 2007)

  4. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: failed to build;is it SP1 problem?

    Are you by any chance using a directory which contains spaces in its path? Did you run configure as the first stage of compilation?

  5. The following user says thank you to wysota for this useful post:

    Masih (15th May 2007)

  6. #4
    Join Date
    Apr 2007
    Posts
    33
    Thanks
    21
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: failed to build;is it SP1 problem?

    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.
    no pain no gain

  7. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: failed to build;is it SP1 problem?

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

  8. The following user says thank you to jacek for this useful post:

    Masih (15th May 2007)

  9. #6
    Join Date
    Apr 2007
    Posts
    33
    Thanks
    21
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: failed to build;is it SP1 problem?

    Quote Originally Posted by wysota View Post
    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)

  10. #7
    Join Date
    Apr 2007
    Posts
    33
    Thanks
    21
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: failed to build;is it SP1 problem?

    Quote Originally Posted by jacek View Post
    @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.
    no pain no gain

  11. #8
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: failed to build;is it SP1 problem?

    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.c pp"
    - Outputs:
    Qt Code:
    1. ".\GeneratedFiles\$(ConfigurationName)\moc_3.cpp"
    To copy to clipboard, switch view to plain text mode 
    - Additional dependencies:
    Qt Code:
    1. $(QTDIR)\bin\moc.exe;.\3.h
    To copy to clipboard, switch view to plain text mode 

    Regards
    Last edited by jacek; 16th May 2007 at 00:04. Reason: changed [code] to [quote]

  12. #9
    Join Date
    Apr 2007
    Posts
    33
    Thanks
    21
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: failed to build;is it SP1 problem?

    Quote Originally Posted by marcel View Post
    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:
    Qt Code:
    1. ".\GeneratedFiles\$(ConfigurationName)\moc_3.cpp"
    To copy to clipboard, switch view to plain text mode 
    - Additional dependencies:
    Qt Code:
    1. $(QTDIR)\bin\moc.exe;.\3.h
    To copy to clipboard, switch view to plain text mode 

    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 .
    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

    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

    Thnx for yr time,
    Regards

  13. #10
    Join Date
    Apr 2007
    Posts
    33
    Thanks
    21
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: failed to build;is it SP1 problem?

    Quote Originally Posted by wysota View Post
    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

  14. #11
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: failed to build;is it SP1 problem?

    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

  15. #12
    Join Date
    Apr 2007
    Posts
    33
    Thanks
    21
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: failed to build;is it SP1 problem?

    Quote Originally Posted by Masih View Post
    @ 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 .
    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

    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

    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.
    no pain no gain

  16. #13
    Join Date
    Apr 2007
    Posts
    33
    Thanks
    21
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: failed to build;is it SP1 problem?

    Quote Originally Posted by marcel View Post
    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

  17. #14
    Join Date
    Apr 2007
    Posts
    33
    Thanks
    21
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: failed to build;is it SP1 problem?

    Hi there!
    It's me again!
    I think I managed to do it!
    I was receiving this moc'ing error and the I saw this link below:
    http://lists.trolltech.com/qt-intere...ad00000-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 I installed it and it is working now. At least it is compiling.

    Thank you guys

  18. #15
    Join Date
    Sep 2008
    Posts
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: failed to build;is it SP1 problem?

    Sometimes antywirus can block moc.exe, uic.exe end atc. Close antywirus and compile project again.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.