Error in Qt 5.2.1 when compiling with CLR flag in VS2012
-
I have a wrapper code for an application written in C# that I'm trying to use in my C++ code. The problem is that if I try to compile using the CLR option in VS2012 I get the following compile errors
C:\Qt\Qt5.5\msvc2012_64_opengl\include\QtCore/qvector.h(66): error C2182: 't' : illegal use of type 'void' 1> C:\Qt\Qt5.5\msvc2012_64_opengl\include\QtCore/qlist.h(285) : see reference to class template instantiation 'QVector<T>' being compiled 1> with 1> [ 1> T=void 1> ] 1> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xmemory0(903) : see reference to function template instantiation 'void std::allocator_traits<_Alloc>::construct<_Ty,_Ty>(std::allocator<_Ty> &,_Objty *,_V0_t &&)' being compiled 1> with 1> [ 1> _Alloc=std::allocator<DataColumn_3D>, 1> _Ty=DataColumn_3D, 1> _Objty=DataColumn_3D, 1> _V0_t=DataColumn_3D 1> ] 1> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xmemory0(903) : see reference to function template instantiation 'void std::allocator_traits<_Alloc>::construct<_Ty,_Ty>(std::allocator<_Ty> &,_Objty *,_V0_t &&)' being compiled 1> with 1> [ 1> _Alloc=std::allocator<DataColumn_3D>, 1> _Ty=DataColumn_3D, 1> _Objty=DataColumn_3D, 1> _V0_t=DataColumn_3D 1> ] 1> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xmemory(433) : see reference to function template instantiation 'void std::_Wrap_alloc<_Alloc>::construct<DataColumn_3D,_Valty>(_Ty *,_V0_t &&)' being compiled 1> with 1> [ 1> _Alloc=std::allocator<DataColumn_3D>, 1> _Valty=DataColumn_3D, 1> _Ty=DataColumn_3D, 1> _V0_t=DataColumn_3D 1> ] 1> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xmemory(433) : see reference to function template instantiation 'void std::_Wrap_alloc<_Alloc>::construct<DataColumn_3D,_Valty>(_Ty *,_V0_t &&)' being compiled 1> with 1> [ 1> _Alloc=std::allocator<DataColumn_3D>, 1> _Valty=DataColumn_3D, 1> _Ty=DataColumn_3D, 1> _V0_t=DataColumn_3D 1> ] 1> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xmemory(473) : see reference to function template instantiation '_FwdIt std::_Uninit_move<_InIt,_FwdIt,std::allocator<_Ty>,DataColumn_3D>(_InIt,_InIt,_FwdIt,std::_Wrap_alloc<_Alloc> &,_Valty *,std::_Nonscalar_ptr_iterator_tag)' being compiled 1> with 1> [ 1> _FwdIt=DataColumn_3D *, 1> _InIt=DataColumn_3D *, 1> _Ty=DataColumn_3D, 1> _Alloc=std::allocator<DataColumn_3D>, 1> _Valty=DataColumn_3D 1> ] 1> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(1561) : see reference to function template instantiation '_FwdIt std::_Uninitialized_move<_Iter,DataColumn_3D*,std::_Wrap_alloc<_Alloc>>(_InIt,_InIt,_FwdIt,std::_Wrap_alloc<_Alloc> &)' being compiled 1> with 1> [ 1> _FwdIt=DataColumn_3D *, 1> _Iter=DataColumn_3D *, 1> _Alloc=std::allocator<DataColumn_3D>, 1> _InIt=DataColumn_3D * 1> ] 1> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(1504) : see reference to function template instantiation 'DataColumn_3D *std::vector<_Ty>::_Umove<DataColumn_3D*>(_Iter,_Iter,DataColumn_3D *)' being compiled 1> with 1> [ 1> _Ty=DataColumn_3D, 1> _Iter=DataColumn_3D * 1> ] 1> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(1504) : see reference to function template instantiation 'DataColumn_3D *std::vector<_Ty>::_Umove<DataColumn_3D*>(_Iter,_Iter,DataColumn_3D *)' being compiled 1> with 1> [ 1> _Ty=DataColumn_3D, 1> _Iter=DataColumn_3D * 1> ] 1> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(1500) : while compiling class template member function 'void std::vector<_Ty>::_Reallocate(unsigned __int64)' 1> with 1> [ 1> _Ty=DataColumn_3D 1> ] 1> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(961) : see reference to function template instantiation 'void std::vector<_Ty>::_Reallocate(unsigned __int64)' being compiled 1> with 1> [ 1> _Ty=DataColumn_3D 1> ] 1> DataSource.cpp(256) : see reference to class template instantiation 'std::vector<_Ty>' being compiled 1> with 1> [ 1> _Ty=DataColumn_3D 1> ] 1>C:\Qt\Qt5.5\msvc2012_64_opengl\include\QtCore/qvector.h(127): error C2182: 'at' : illegal use of type 'void' 1>C:\Qt\Qt5.5\msvc2012_64_opengl\include\QtCore/qvector.h(128): error C2182: '[]' : illegal use of type 'void' 1>C:\Qt\Qt5.5\msvc2012_64_opengl\include\QtCore/qvector.h(129): error C2182: '[]' : illegal use of type 'void' 1>C:\Qt\Qt5.5\msvc2012_64_opengl\include\QtCore/qvector.h(130): error C2182: 't' : illegal use of type 'void' 1>C:\Qt\Qt5.5\msvc2012_64_opengl\include\QtCore/qvector.h(132): error C2182: 't' : illegal use of type 'void' 1>C:\Qt\Qt5.5\msvc2012_64_opengl\include\QtCore/qvector.h(133): error C2182: 't' : illegal use of type 'void' 1>C:\Qt\Qt5.5\msvc2012_64_opengl\include\QtCore/qvector.h(134): error C2182: 't' : illegal use of type 'void' 1>C:\Qt\Qt5.5\msvc2012_64_opengl\include\QtCore/qvector.h(135): error C2182: 't' : illegal use of type 'void' 1>C:\Qt\Qt5.5\msvc2012_64_opengl\include\QtCore/qvector.h(143): error C2182: 't' : illegal use of type 'void' 1>C:\Qt\Qt5.5\msvc2012_64_opengl\include\QtCore/qvector.h(145): error C2182: 't' : illegal use of type 'void' 1>C:\Qt\Qt5.5\msvc2012_64_opengl\include\QtCore/qvector.h(146): error C2182: 't' : illegal use of type 'void' 1>C:\Qt\Qt5.5\msvc2012_64_opengl\include\QtCore/qvector.h(147): error C2182: 't' : illegal use of type 'void' 1>C:\Qt\Qt5.5\msvc2012_64_opengl\include\QtCore/qvector.h(148): error C2182: 't' : illegal use of type 'void' 1>C:\Qt\Qt5.5\msvc2012_64_opengl\include\QtCore/qvector.h(152): error C2182: 't' : illegal use of type 'void' 1>C:\Qt\Qt5.5\msvc2012_64_opengl\include\QtCore/qvector.h(164): error C2182: 't' : illegal use of type 'void' 1>C:\Qt\Qt5.5\msvc2012_64_opengl\include\QtCore/qvector.h(197): error C2182: 'x' : illegal use of type 'void' 1>C:\Qt\Qt5.5\msvc2012_64_opengl\include\QtCore/qvector.h(198): error C2182: 'x' : illegal use of type 'void' 1>C:\Qt\Qt5.5\msvc2012_64_opengl\include\QtCore/qvector.h(204): error C2182: 'first' : illegal use of type 'void' 1>C:\Qt\Qt5.5\msvc2012_64_opengl\include\QtCore/qvector.h(205): error C2182: 'first' : illegal use of type 'void' 1>C:\Qt\Qt5.5\msvc2012_64_opengl\include\QtCore/qvector.h(206): error C2182: 'last' : illegal use of type 'void' 1>C:\Qt\Qt5.5\msvc2012_64_opengl\include\QtCore/qvector.h(207): error C2182: 'last' : illegal use of type 'void' 1>C:\Qt\Qt5.5\msvc2012_64_opengl\include\QtCore/qvector.h(208): error C2182: 't' : illegal use of type 'void' 1>C:\Qt\Qt5.5\msvc2012_64_opengl\include\QtCore/qvector.h(209): error C2182: 't' : illegal use of type 'void' 1>C:\Qt\Qt5.5\msvc2012_64_opengl\include\QtCore/qvector.h(213): error C2182: 'defaultValue' : illegal use of type 'void' 1>C:\Qt\Qt5.5\msvc2012_64_opengl\include\QtCore/qvector.h(219): error C2182: 'reference' : illegal use of type 'void' 1>C:\Qt\Qt5.5\msvc2012_64_opengl\include\QtCore/qvector.h(220): error C2182: 'const_reference' : illegal use of type 'void' 1>C:\Qt\Qt5.5\msvc2012_64_opengl\include\QtCore/qvector.h(225): error C2182: 't' : illegal use of type 'void' 1>C:\Qt\Qt5.5\msvc2012_64_opengl\include\QtCore/qvector.h(226): error C2182: 't' : illegal use of type 'void' 1>C:\Qt\Qt5.5\msvc2012_64_opengl\include\QtCore/qvector.h(231): error C2182: 'front' : illegal use of type 'void' 1>C:\Qt\Qt5.5\msvc2012_64_opengl\include\QtCore/qvector.h(240): error C2182: 't' : illegal use of type 'void' 1>C:\Qt\Qt5.5\msvc2012_64_opengl\include\QtCore/qvector.h(242): error C2182: 't' : illegal use of type 'void'
I tried to compile Qt from source following the following link http://wiki.qt.io/Building_Qt_5_from_Git which compiles fine, however, still the problem when using CLR flag in Visual Studio.
Is there an option in that I can use in the configure stage of Qt in order to have support for CLR? If not, how or what can I do in order to be able to integrate my C# code into my C++ + Qt code?