Results 1 to 5 of 5

Thread: problems going from 4.3.x to 4.4.0

  1. #1
    Join Date
    Oct 2007
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default problems going from 4.3.x to 4.4.0

    Hi

    I'm having some problems compiling an application that work perfectly fine under 4.3 but when I started using 4.4 all hell broke loose.

    The application is originally developed in linux, but I'm are trying to move it over to windows. I'm using vs2008 so the release of 4.4 was greatly appreciated, if only I could get it to compile.

    The error I'm getting is various forms of this
    Qt Code:
    1. 3>c:\qt\4.4.0\include\qtcore\../../src/corelib/tools/qvector.h(88) : error C2182: 't' : illegal use of type 'void'
    2. 3> c:\qt\4.4.0\include\qtcore\../../src/corelib/tools/qvector.h(278) : see reference to class template instantiation 'QVector<T>' being compiled
    3. 3> with
    4. 3> [
    5. 3> T=void
    6. 3> ]
    7. 3> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\memory(205) : see reference to function template instantiation '_FwdIt stdext::unchecked_uninitialized_copy<_InIt,_FwdIt,_Alloc>(_InIt,_InIt,_FwdIt,_Alloc &)' being compiled
    8. 3> with
    9. 3> [
    10. 3> _FwdIt=int *,
    11. 3> _InIt=int *,
    12. 3> _Alloc=std::allocator<int>
    13. 3> ]
    14. 3> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\memory(851) : see reference to function template instantiation '_FwdIt std::_Uninit_move<int*,_FwdIt,_Alloc,std::_Move_operation_category<_Value>::_Move_cat>(_InIt,_InIt,_FwdIt,_Alloc &,_MoveCatTy,std::_Range_checked_iterator_tag)' being compiled
    15. 3> with
    16. 3> [
    17. 3> _FwdIt=int *,
    18. 3> _Alloc=std::allocator<int>,
    19. 3> _Value=int,
    20. 3> _InIt=int *,
    21. 3> _MoveCatTy=std::_Move_operation_category<int>::_Move_cat
    22. 3> ]
    23. 3> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\vector(1153) : see reference to function template instantiation '_FwdIt stdext::_Unchecked_uninitialized_move<_Iter,int*,std::allocator<_Ty>>(_InIt,_InIt,_FwdIt,_Alloc &)' being compiled
    24. 3> with
    25. 3> [
    26. 3> _FwdIt=int *,
    27. 3> _Iter=int *,
    28. 3> _Ty=int,
    29. 3> _InIt=int *,
    30. 3> _Alloc=std::allocator<int>
    31. 3> ]
    32. 3> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\vector(1183) : see reference to function template instantiation 'int *std::vector<_Ty>::_Umove<int*>(_Iter,_Iter,int *)' being compiled
    33. 3> with
    34. 3> [
    35. 3> _Ty=int,
    36. 3> _Iter=int *
    37. 3> ]
    38. 3> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\vector(1158) : while compiling class template member function 'void std::vector<_Ty>::_Insert_n(std::_Vector_const_iterator<_Ty,_Alloc>,__w64 unsigned int,const _Ty &)'
    39. 3> with
    40. 3> [
    41. 3> _Ty=int,
    42. 3> _Alloc=std::allocator<int>
    43. 3> ]
    44. 3> d:\projects\astrix\main\source\library\legacyastrix\lib\rpslib\cppsrc\tuning\CAutoTuneModelEngine.hxx(111) : see reference to class template instantiation 'std::vector<_Ty>' being compiled with
    45. 3> [
    46. 3> _Ty=int
    47. 3> ]
    48.  
    49. 3>c:\qt\4.4.0\include\qtcore\../../src/corelib/tools/qvector.h(114) : error C2182: 'at' : illegal use of type 'void'
    50. 3>c:\qt\4.4.0\include\qtcore\../../src/corelib/tools/qvector.h(115) : error C2182: '[]' : illegal use of type 'void'
    51. 3>c:\qt\4.4.0\include\qtcore\../../src/corelib/tools/qvector.h(116) : error C2182: '[]' : illegal use of type 'void'
    To copy to clipboard, switch view to plain text mode 

    Line 44 refers to my code, but its a normal
    Qt Code:
    1. class CAutoTuneModelEngine : public QObject {
    2. Q_OBJECT;
    3. //lots of other stuff,
    4. vector<int> m_predMdlSingleList;
    5. };
    To copy to clipboard, switch view to plain text mode 


    And I'm also getting reports like this, with no errors pointing to my code

    Qt Code:
    1. 1>c:\qt\4.4.0\include\qtcore\../../src/corelib/tools/qvector.h(88) : error C2182: 't' : illegal use of type 'void'
    2. 1> c:\qt\4.4.0\include\qtcore\../../src/corelib/tools/qhash.h(242) : see reference to class template instantiation 'QVector<T>' being compiled
    3. 1> with
    4. 1> [
    5. 1> T=void
    6. 1> ]
    7. 1> c:\qt\4.4.0\include\qtcore\../../src/corelib/tools/qhash.h(548) : see reference to class template instantiation 'QHashDummyNode<Key,T>' being compiled
    8. 1> with
    9. 1> [
    10. 1> Key=QAccessible::Method,
    11. 1> T=QHashDummyValue
    12. 1> ]
    13. 1> c:\qt\4.4.0\include\qtcore\../../src/corelib/tools/qhash.h(546) : while compiling class template member function 'void QHash<Key,T>::detach_helper(void)'
    14. 1> with
    15. 1> [
    16. 1> Key=QAccessible::Method,
    17. 1> T=QHashDummyValue
    18. 1> ]
    19. 1> c:\qt\4.4.0\include\qtcore\../../src/corelib/tools/qhash.h(523) : while compiling class template member function 'void QHash<Key,T>::freeData(QHashData *)'
    20. 1> with
    21. 1> [
    22. 1> Key=QAccessible::Method,
    23. 1> T=QHashDummyValue
    24. 1> ]
    25. 1> c:\qt\4.4.0\include\qtcore\../../src/corelib/tools/qset.h(211) : see reference to class template instantiation 'QHash<Key,T>' being compiled
    26. 1> with
    27. 1> [
    28. 1> Key=QAccessible::Method,
    29. 1> T=QHashDummyValue
    30. 1> ]
    31. 1> c:\qt\4.4.0\include\qtgui\../../src/gui/accessible/qaccessible.h(338) : see reference to class template instantiation 'QSet<T>' being compiled
    32. 1> with
    33. 1> [
    34. 1> T=QAccessible::Method
    35. 1> ]
    36. 1>c:\qt\4.4.0\include\qtcore\../../src/corelib/tools/qvector.h(114) : error C2182: 'at' : illegal use of type 'void'
    37. 1>c:\qt\4.4.0\include\qtcore\../../src/corelib/tools/qvector.h(115) : error C2182: '[]' : illegal use of type 'void'
    To copy to clipboard, switch view to plain text mode 

    Any help is GREATLY appreciated.....

  2. #2
    Join Date
    Jan 2006
    Location
    Bremen, Germany
    Posts
    554
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: problems going from 4.3.x to 4.4.0

    You should try to break down the error - minimize your class until the error disappears to see what's triggering the error so we can see the real cause of the problem.

  3. #3

    Default Re: problems going from 4.3.x to 4.4.0

    I am having the same compile errors as Ovis. Has anyone found a solution to this problem? Could this in any way be related to the compile issue between Qt and Visual Studio 2005 SP1? http://support.microsoft.com/kb/930198

    EDIT:
    I tried the hotfix and it did NOT resolve the compile errors I am getting.
    Last edited by average; 23rd June 2008 at 19:08.

  4. #4

    Default Re: problems going from 4.3.x to 4.4.0

    It appears this is caused by having the Common Language Runtime project setting set to "Common Language Runtime Support (/clr)". Does Qt not support this compile option?

  5. #5
    Join Date
    Aug 2007
    Posts
    166
    Thanks
    16
    Thanked 14 Times in 14 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: problems going from 4.3.x to 4.4.0

    Hmm Ovis I see that you have "dotcomma - ;"(what is the name calling of this on English :P ) after the Q_OBJECT declaration, you must remove it.

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.