C2244 happens when compiling QT5.2.0 with VS2005



  • *Hi, seniors,

    I compiled 5.2.0 source package with VS2005, but met C2244 error when I did as what is detailed in http://qt-project.org/doc/qt-5/windows-building.html. the error info is:*

    _ ........
    e:\qt\5.2.0\qtbase\include\qtcore../../src/corelib/tools/qvector.h(621) : error
    C2244: 'QVector<T>::insert' : unable to match function definition to an existin
    g declaration
    definition
    'QVector<T>::iterator QVector<T>::insert(QTypedArrayData<T>::iterator,QV
    ector<T>::size_type,const T &)'
    existing declarations
    'QTypedArrayData<T>::iterator QVector<T>::insert(QTypedArrayData<T>::ite
    rator,const T &)'
    'QTypedArrayData<T>::iterator QVector<T>::insert(QTypedArrayData<T>::ite
    rator,int,const T &)'
    'void QVector<T>::insert(int,int,const T &)'
    'void QVector<T>::insert(int,const T &)'
    e:\qt\5.2.0\qtbase\include\qtcore../../src/corelib/tools/qvector.h(666) : error
    C2244: 'QVector<T>::erase' : unable to match function definition to an existing
    declaration
    definition
    'QVector<T>::iterator QVector<T>::erase(QTypedArrayData<T>::iterator,QTy
    pedArrayData<T>::iterator)'
    existing declarations
    'QTypedArrayData<T>::iterator QVector<T>::erase(QTypedArrayData<T>::iter
    ator)'
    'QTypedArrayData<T>::iterator QVector<T>::erase(QTypedArrayData<T>::iter
    ator,QTypedArrayData<T>::iterator)'
    property.cpp
    e:\qt\5.2.0\qtbase\include\qtcore../../src/corelib/tools/qvector.h(621) : error
    C2244: 'QVector<T>::insert' : unable to match function definition to an existin
    g declaration
    definition
    'QVector<T>::iterator QVector<T>::insert(QTypedArrayData<T>::iterator,QV
    ector<T>::size_type,const T &)'
    existing declarations
    'QTypedArrayData<T>::iterator QVector<T>::insert(QTypedArrayData<T>::ite
    rator,const T &)'
    'QTypedArrayData<T>::iterator QVector<T>::insert(QTypedArrayData<T>::ite
    rator,int,const T &)'
    'void QVector<T>::insert(int,int,const T &)'
    'void QVector<T>::insert(int,const T &)'
    e:\qt\5.2.0\qtbase\include\qtcore../../src/corelib/tools/qvector.h(666) : error
    C2244: 'QVector<T>::erase' : unable to match function definition to an existing
    declaration
    definition
    'QVector<T>::iterator QVector<T>::erase(QTypedArrayData<T>::iterator,QTy
    pedArrayData<T>::iterator)'
    existing declarations
    'QTypedArrayData<T>::iterator QVector<T>::erase(QTypedArrayData<T>::iter
    ator)'
    'QTypedArrayData<T>::iterator QVector<T>::erase(QTypedArrayData<T>::iter
    ator,QTypedArrayData<T>::iterator)'
    meta.cpp
    e:\qt\5.2.0\qtbase\include\qtcore../../src/corelib/tools/qvector.h(621) : error
    C2244: 'QVector<T>::insert' : unable to match function definition to an existin
    g declaration
    definition
    'QVector<T>::iterator QVector<T>::insert(QTypedArrayData<T>::iterator,QV
    ector<T>::size_type,const T &)'
    existing declarations
    'QTypedArrayData<T>::iterator QVector<T>::insert(QTypedArrayData<T>::ite
    rator,const T &)'
    'QTypedArrayData<T>::iterator QVector<T>::insert(QTypedArrayData<T>::ite
    rator,int,const T &)'
    'void QVector<T>::insert(int,int,const T &)'
    'void QVector<T>::insert(int,const T &)'
    e:\qt\5.2.0\qtbase\include\qtcore../../src/corelib/tools/qvector.h(666) : error
    C2244: 'QVector<T>::erase' : unable to match function definition to an existing
    declaration
    definition
    'QVector<T>::iterator QVector<T>::erase(QTypedArrayData<T>::iterator,QTy
    pedArrayData<T>::iterator)'
    existing declarations
    'QTypedArrayData<T>::iterator QVector<T>::erase(QTypedArrayData<T>::iter
    ator)'
    'QTypedArrayData<T>::iterator QVector<T>::erase(QTypedArrayData<T>::iter
    ator,QTypedArrayData<T>::iterator)'
    Generating Code...
    NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\c
    l.EXE"' : return code '0x2'
    Stop.
    Building qmake failed, return code 2_



  • The above info is ugly copying from compiling console. The key problem is c2244, as following. The code can be found in qvector.h

    qvector.h(621) : error C2244: ‘QVector<T>::insert’ : unable to match function definition to an existin g declaration definition ‘QVector<T>::iterator QVector<T>::insert(QTypedArrayData<T>::iterator,QV ector<T>::size_type,const T &)’

    existing declarations
    ‘QTypedArrayData<T>::iterator QVector<T>::insert(QTypedArrayData<T>::ite rator,const T &)’
    ‘QTypedArrayData<T>::iterator QVector<T>::insert(QTypedArrayData<T>::ite rator,int,const T &)’
    ‘void QVector<T>::insert(int,int,const T &)’
    ‘void QVector<T>::insert(int,const T &)’


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.