Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате
Форум программистов > С/С++: Кроссплатформенное программирование, Qt/Gtk+/wxWidgets > [Qt] error: no matching function for call to 'std:


Автор: User008 7.12.2009, 02:57
Есть проект. Собирался и работал в Qt. Сейчас пересустановил виндоус, и проект больше не собирается. Как узнать откуда берётся эта ошибка?
c:\qt\2009.05\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/bits/stl_vector.h:991: error: no matching function for call to 'std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >::_M_fill_initialize(size_t, int&)'

Автор: andrew_121 7.12.2009, 04:29
Лог компиляции покажи.

Автор: User008 8.12.2009, 14:15
Выполняется сборка проекта Proj...
Запускается: c:/qt/2009.05/qt/bin/qmake.exe C:/Sources/proj/Proj.pro -spec win32-g++ -r 
Завершено с кодом возврата 0.
Запускается: C:/Qt/2009.05/mingw/bin/mingw32-make.exe -w 
mingw32-make: Entering directory `C:/Sources/proj'
C:/Qt/2009.05/mingw/bin/mingw32-make -f Makefile.Release
mingw32-make[1]: Entering directory `C:/Sources/proj'
g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\Qt\2009.05\qt\include\QtCore" -I"..\..\Qt\2009.05\qt\include\QtGui" -I"..\..\Qt\2009.05\qt\include" -I"..\..\Qt\2009.05\qt\include\ActiveQt" -I"release" -I"." -I"..\..\Qt\2009.05\qt\mkspecs\win32-g++" -o release\main.o main.cpp
g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\Qt\2009.05\qt\include\QtCore" -I"..\..\Qt\2009.05\qt\include\QtGui" -I"..\..\Qt\2009.05\qt\include" -I"..\..\Qt\2009.05\qt\include\ActiveQt" -I"release" -I"." -I"..\..\Qt\2009.05\qt\mkspecs\win32-g++" -o release\mainwindow.o mainwindow.cpp
In file included from c:\qt\2009.05\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/vector:65,
from ..\..\Qt\2009.05\qt\include/QtCore/../../src/corelib/tools/qvector.h:52,
from ..\..\Qt\2009.05\qt\include/QtCore/qvector.h:1,
from ..\..\Qt\2009.05\qt\include/QtGui/../../src/gui/painting/qbrush.h:47,
from ..\..\Qt\2009.05\qt\include/QtGui/qbrush.h:1,
from ..\..\Qt\2009.05\qt\include/QtGui/../../src/gui/kernel/qpalette.h:47,
from ..\..\Qt\2009.05\qt\include/QtGui/qpalette.h:1,
from ..\..\Qt\2009.05\qt\include/QtGui/../../src/gui/kernel/qwidget.h:49,
from ..\..\Qt\2009.05\qt\include/QtGui/qwidget.h:1,
from ..\..\Qt\2009.05\qt\include/QtGui/../../src/gui/widgets/qmainwindow.h:45,
from ..\..\Qt\2009.05\qt\include/QtGui/qmainwindow.h:1,
from ..\..\Qt\2009.05\qt\include/QtGui/QMainWindow:1,
from mainwindow.h:4,
from mainwindow.cpp:1:
c:\qt\2009.05\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/bits/stl_vector.h: In member function 'void std::vector<_Tp, _Alloc>::_M_initialize_dispatch(_Integer, _Integer, std::__true_type) [with _Integer = int, _Tp = std::vector<int, std::allocator<int> >, _Alloc = std::allocator<std::vector<int, std::allocator<int> > >]':
c:\qt\2009.05\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/bits/stl_vector.h:303: instantiated from 'std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const _Alloc&) [with _InputIterator = int, _Tp = std::vector<int, std::allocator<int> >, _Alloc = std::allocator<std::vector<int, std::allocator<int> > >]'
mainwindow.cpp:70: instantiated from here
c:\qt\2009.05\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/bits/stl_vector.h:991: error: no matching function for call to 'std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >::_M_fill_initialize(size_t, int&)'
c:\qt\2009.05\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/bits/stl_vector.h:1033: note: candidates are: void std::vector<_Tp, _Alloc>::_M_fill_initialize(size_t, const _Tp&) [with _Tp = std::vector<int, std::allocator<int> >, _Alloc = std::allocator<std::vector<int, std::allocator<int> > >]
mingw32-make[1]: Leaving directory `C:/Sources/proj'
mingw32-make: Leaving directory `C:/Sources/proj'
mingw32-make[1]: *** [release/mainwindow.o] Error 1
mingw32-make: *** [release] Error 2
Завершено с кодом возврата 2.
Ошибка во время сборки проекта Proj
Во время выполнения сборки на этапе 'Make'

Автор: andrew_121 8.12.2009, 15:14
Цитата(User008 @  8.12.2009,  14:15 Найти цитируемый пост)
mainwindow.h:4

покажи.

Цитата(User008 @  8.12.2009,  14:15 Найти цитируемый пост)
mainwindow.cpp:1

покажи.

Цитата(User008 @  8.12.2009,  14:15 Найти цитируемый пост)
mainwindow.cpp:70

покажи.

Автор: User008 8.12.2009, 15:47
mainwindow.h:4
#include <QtGui/QMainWindow>

mainwindow.cpp:1
#include "mainwindow.h"

mainwindow.cpp:70
std::vector<std::vector<int> > c(items, criteria);

Автор: User008 8.12.2009, 18:01
Понял свою ошибку, спасибо.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)