PDA

View Full Version : problems going from 4.3.x to 4.4.0



Ovis
20th June 2008, 20:50
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


3>c:\qt\4.4.0\include\qtcore\../../src/corelib/tools/qvector.h(88) : error C2182: 't' : illegal use of type 'void'
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> with
3> [
3> T=void
3> ]
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
3> with
3> [
3> _FwdIt=int *,
3> _InIt=int *,
3> _Alloc=std::allocator<int>
3> ]
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
3> with
3> [
3> _FwdIt=int *,
3> _Alloc=std::allocator<int>,
3> _Value=int,
3> _InIt=int *,
3> _MoveCatTy=std::_Move_operation_category<int>::_Move_cat
3> ]
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
3> with
3> [
3> _FwdIt=int *,
3> _Iter=int *,
3> _Ty=int,
3> _InIt=int *,
3> _Alloc=std::allocator<int>
3> ]
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
3> with
3> [
3> _Ty=int,
3> _Iter=int *
3> ]
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 &)'
3> with
3> [
3> _Ty=int,
3> _Alloc=std::allocator<int>
3> ]
3> d:\projects\astrix\main\source\library\legacyastri x\lib\rpslib\cppsrc\tuning\CAutoTuneModelEngine.hx x(111) : see reference to class template instantiation 'std::vector<_Ty>' being compiled with
3> [
3> _Ty=int
3> ]

3>c:\qt\4.4.0\include\qtcore\../../src/corelib/tools/qvector.h(114) : error C2182: 'at' : illegal use of type 'void'
3>c:\qt\4.4.0\include\qtcore\../../src/corelib/tools/qvector.h(115) : error C2182: '[]' : illegal use of type 'void'
3>c:\qt\4.4.0\include\qtcore\../../src/corelib/tools/qvector.h(116) : error C2182: '[]' : illegal use of type 'void'


Line 44 refers to my code, but its a normal


class CAutoTuneModelEngine : public QObject {
Q_OBJECT;
//lots of other stuff,
vector<int> m_predMdlSingleList;
};



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



1>c:\qt\4.4.0\include\qtcore\../../src/corelib/tools/qvector.h(88) : error C2182: 't' : illegal use of type 'void'
1> c:\qt\4.4.0\include\qtcore\../../src/corelib/tools/qhash.h(242) : see reference to class template instantiation 'QVector<T>' being compiled
1> with
1> [
1> T=void
1> ]
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
1> with
1> [
1> Key=QAccessible::Method,
1> T=QHashDummyValue
1> ]
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)'
1> with
1> [
1> Key=QAccessible::Method,
1> T=QHashDummyValue
1> ]
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 *)'
1> with
1> [
1> Key=QAccessible::Method,
1> T=QHashDummyValue
1> ]
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
1> with
1> [
1> Key=QAccessible::Method,
1> T=QHashDummyValue
1> ]
1> c:\qt\4.4.0\include\qtgui\../../src/gui/accessible/qaccessible.h(338) : see reference to class template instantiation 'QSet<T>' being compiled
1> with
1> [
1> T=QAccessible::Method
1> ]
1>c:\qt\4.4.0\include\qtcore\../../src/corelib/tools/qvector.h(114) : error C2182: 'at' : illegal use of type 'void'
1>c:\qt\4.4.0\include\qtcore\../../src/corelib/tools/qvector.h(115) : error C2182: '[]' : illegal use of type 'void'


Any help is GREATLY appreciated.....

ChristianEhrlicher
23rd June 2008, 06:29
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.

average
23rd June 2008, 18:12
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.

average
25th June 2008, 15:16
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?

The Storm
26th June 2008, 19:22
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. :)