ich habe Probleme bei der QT installation. Es kann auch sein das der Fehler ein sehr simpler einfacher ist.
Also ich habe QT ganz normal installiert. Ich lege ein Projekt an und erstelle eine main.cpp mit einem Hello World code:
Code: Alles auswählen
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
****************************************************************************/
#include <QApplication>
#include <QPushButton>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QPushButton hello("Hello world!");
hello.resize(100, 30);
hello.show();
return app.exec();
} Code: Alles auswählen
qmake -project
qmakeWenn ich es dann mit make compilen möchte erhalte ich folgende Ausgabe:
Code: Alles auswählen
pplication.h:47,
from ../Qt/4.3.4/include/QtCore/qcoreapplication.h:1,
from ../Qt/4.3.4/include/QtGui/../../src/gui/kernel/qapplicatio
n.h:47,
from ../Qt/4.3.4/include/QtGui/qapplication.h:1,
from ../Qt/4.3.4/include/QtGui/QApplication:1,
from main.cpp:6:
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stream_
iterator.h: At global scope:
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stream_
iterator.h:46: error: `ptrdiff_t' has not been declared
In file included from C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/
c++/3.4.2/list:71,
from ../Qt/4.3.4/include/QtCore/../../src/corelib/tools/qlist.h
:53,
from ../Qt/4.3.4/include/QtCore/qlist.h:1,
from ../Qt/4.3.4/include/QtCore/../../src/corelib/kernel/qobjec
t.h:52,
from ../Qt/4.3.4/include/QtCore/qobject.h:1,
from ../Qt/4.3.4/include/QtCore/../../src/corelib/kernel/qcorea
pplication.h:47,
from ../Qt/4.3.4/include/QtCore/qcoreapplication.h:1,
from ../Qt/4.3.4/include/QtGui/../../src/gui/kernel/qapplicatio
n.h:47,
from ../Qt/4.3.4/include/QtGui/qapplication.h:1,
from ../Qt/4.3.4/include/QtGui/QApplication:1,
from main.cpp:6:
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_lis
t.h:116: error: `ptrdiff_t' does not name a type
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_lis
t.h:192: error: `ptrdiff_t' does not name a type
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_lis
t.h:405: error: `ptrdiff_t' does not name a type
In file included from ../Qt/4.3.4/include/QtCore/qlist.h:1,
from ../Qt/4.3.4/include/QtCore/../../src/corelib/kernel/qobjec
t.h:52,
from ../Qt/4.3.4/include/QtCore/qobject.h:1,
from ../Qt/4.3.4/include/QtCore/../../src/corelib/kernel/qcorea
pplication.h:47,
from ../Qt/4.3.4/include/QtCore/qcoreapplication.h:1,
from ../Qt/4.3.4/include/QtGui/../../src/gui/kernel/qapplicatio
n.h:47,
from ../Qt/4.3.4/include/QtGui/qapplication.h:1,
from ../Qt/4.3.4/include/QtGui/QApplication:1,
from main.cpp:6:
../Qt/4.3.4/include/QtCore/../../src/corelib/tools/qlist.h:153: error: `ptrdiff_
t' does not name a type
../Qt/4.3.4/include/QtCore/../../src/corelib/tools/qlist.h:200: error: `ptrdiff_
t' does not name a type
../Qt/4.3.4/include/QtCore/../../src/corelib/tools/qlist.h:276: error: `ptrdiff_
t' does not name a type
In file included from C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/
c++/3.4.2/vector:71,
from ../Qt/4.3.4/include/QtCore/../../src/corelib/tools/qvector
.h:54,
from ../Qt/4.3.4/include/QtCore/qvector.h:1,
from ../Qt/4.3.4/include/QtGui/../../src/gui/painting/qpolygon.
h:47,
from ../Qt/4.3.4/include/QtGui/qpolygon.h:1,
from ../Qt/4.3.4/include/QtGui/../../src/gui/painting/qmatrix.h
:47,
from ../Qt/4.3.4/include/QtGui/qmatrix.h:1,
from ../Qt/4.3.4/include/QtGui/../../src/gui/painting/qtransfor
m.h:46,
from ../Qt/4.3.4/include/QtGui/qtransform.h:1,
from ../Qt/4.3.4/include/QtGui/../../src/gui/image/qimage.h:47,
from ../Qt/4.3.4/include/QtGui/qimage.h:1,
from ../Qt/4.3.4/include/QtGui/../../src/gui/image/qpixmap.h:51
,
from ../Qt/4.3.4/include/QtGui/qpixmap.h:1,
from ../Qt/4.3.4/include/QtGui/../../src/gui/image/qicon.h:49,
from ../Qt/4.3.4/include/QtGui/qicon.h:1,
from ../Qt/4.3.4/include/QtGui/../../src/gui/widgets/qabstractb
utton.h:47,
from ../Qt/4.3.4/include/QtGui/qabstractbutton.h:1,
from ../Qt/4.3.4/include/QtGui/../../src/gui/widgets/qpushbutto
n.h:47,
from ../Qt/4.3.4/include/QtGui/qpushbutton.h:1,
from ../Qt/4.3.4/include/QtGui/QPushButton:1,
from main.cpp:7:
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_vec
tor.h:161: error: `ptrdiff_t' does not name a type
In file included from C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/
c++/3.4.2/vector:72,
from ../Qt/4.3.4/include/QtCore/../../src/corelib/tools/qvector
.h:54,
from ../Qt/4.3.4/include/QtCore/qvector.h:1,
from ../Qt/4.3.4/include/QtGui/../../src/gui/painting/qpolygon.
h:47,
from ../Qt/4.3.4/include/QtGui/qpolygon.h:1,
from ../Qt/4.3.4/include/QtGui/../../src/gui/painting/qmatrix.h
:47,
from ../Qt/4.3.4/include/QtGui/qmatrix.h:1,
from ../Qt/4.3.4/include/QtGui/../../src/gui/painting/qtransfor
m.h:46,
from ../Qt/4.3.4/include/QtGui/qtransform.h:1,
from ../Qt/4.3.4/include/QtGui/../../src/gui/image/qimage.h:47,
from ../Qt/4.3.4/include/QtGui/qimage.h:1,
from ../Qt/4.3.4/include/QtGui/../../src/gui/image/qpixmap.h:51
,
from ../Qt/4.3.4/include/QtGui/qpixmap.h:1,
from ../Qt/4.3.4/include/QtGui/../../src/gui/image/qicon.h:49,
from ../Qt/4.3.4/include/QtGui/qicon.h:1,
from ../Qt/4.3.4/include/QtGui/../../src/gui/widgets/qabstractb
utton.h:47,
from ../Qt/4.3.4/include/QtGui/qabstractbutton.h:1,
from ../Qt/4.3.4/include/QtGui/../../src/gui/widgets/qpushbutto
n.h:47,
from ../Qt/4.3.4/include/QtGui/qpushbutton.h:1,
from ../Qt/4.3.4/include/QtGui/QPushButton:1,
from main.cpp:7:
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:108: error: template argument 3 is invalid
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:136: error: variable or field `_M_incr' declared void
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:136: error: expected `;' before '(' token
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:150: error: expected `;' before "bool"
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:179: error: expected init-declarator before "operator"
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:179: error: expected `,' or `;' before "operator"
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:228: error: declaration of `operator+=' as non-function
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:228: error: expected `;' before '(' token
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:234: error: expected `;' before "iterator"
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:235: error: declaration of `operator-=' as non-function
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:235: error: expected `;' before '(' token
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:241: error: expected `;' before "iterator"
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:242: error: declaration of `operator+' as non-function
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:242: error: expected `;' before '(' token
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:248: error: expected `;' before "iterator"
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:249: error: declaration of `operator-' as non-function
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:249: error: expected `;' before '(' token
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:255: error: expected `;' before "reference"
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:256: error: declaration of `operator[]' as non-function
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:256: error: expected `;' before '(' token
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:258: error: expected `;' before '}' token
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:261: error: declaration of `operator+' as non-function
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:261: error: `ptrdiff_t' was not declared in this scope
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:261: error: expected primary-expression before "const"
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:261: error: expected `,' or `;' before '{' token
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:312: error: declaration of `operator+=' as non-function
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:312: error: expected `;' before '(' token
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:318: error: expected `;' before "const_iterator"
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:319: error: declaration of `operator-=' as non-function
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:319: error: expected `;' before '(' token
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:325: error: expected `;' before "const_iterator"
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:326: error: declaration of `operator+' as non-function
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:326: error: expected `;' before '(' token
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:331: error: expected `;' before "const_iterator"
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:332: error: declaration of `operator-' as non-function
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:332: error: expected `;' before '(' token
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:338: error: expected `;' before "const_reference"
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:339: error: declaration of `operator[]' as non-function
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:339: error: expected `;' before '(' token
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:341: error: expected `;' before '}' token
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:344: error: declaration of `operator+' as non-function
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:344: error: `ptrdiff_t' was not declared in this scope
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:344: error: expected primary-expression before "const"
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:345: error: expected `,' or `;' before '{' token
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:420: error: `ptrdiff_t' does not name a type
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h: In member function `void std::vector<bool, _Alloc>::_M_initialize(size_t
)':
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:448: error: there are no arguments to `difference_type' that depend on a
template parameter, so a declaration of `difference_type' must be available
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h: In member function `void std::vector<bool, _Alloc>::_M_insert_range(std:
:_Bit_iterator, _ForwardIterator, _ForwardIterator, std::forward_iterator_tag)':
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:516: error: there are no arguments to `difference_type' that depend on a
template parameter, so a declaration of `difference_type' must be available
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:518: error: there are no arguments to `difference_type' that depend on a
template parameter, so a declaration of `difference_type' must be available
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h: In member function `std::_Bit_reference std::vector<bool, _Alloc>::opera
tor[](size_t)':
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:573: error: there are no arguments to `difference_type' that depend on a
template parameter, so a declaration of `difference_type' must be available
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h: In member function `bool std::vector<bool, _Alloc>::operator[](size_t) c
onst':
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:576: error: there are no arguments to `difference_type' that depend on a
template parameter, so a declaration of `difference_type' must be available
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h: In member function `std::_Bit_iterator std::vector<bool, _Alloc>::insert
(std::_Bit_iterator, bool)':
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:779: error: `difference_type' does not name a type
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:785: error: `__n' undeclared (first use this function)
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h: In member function `void std::vector<bool, _Alloc>::_M_fill_insert(std::
_Bit_iterator, size_t, bool)':
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:817: error: there are no arguments to `difference_type' that depend on a
template parameter, so a declaration of `difference_type' must be available
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:818: error: there are no arguments to `difference_type' that depend on a
template parameter, so a declaration of `difference_type' must be available
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:819: error: there are no arguments to `difference_type' that depend on a
template parameter, so a declaration of `difference_type' must be available
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:828: error: there are no arguments to `difference_type' that depend on a
template parameter, so a declaration of `difference_type' must be available
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h: In member function `std::_Bit_iterator std::vector<bool, _Alloc>::erase(
std::_Bit_iterator)':
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:844: error: no match for 'operator+' in '__position + 1'
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:845: error: no match for 'operator+' in '__position + 1'
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h: In member function `void std::vector<bool, _Alloc>::resize(size_t, bool)
':
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bve
ctor.h:859: error: there are no arguments to `difference_type' that depend on a
template parameter, so a declaration of `difference_type' must be available
In file included from ../Qt/4.3.4/include/QtCore/qvector.h:1,
from ../Qt/4.3.4/include/QtGui/../../src/gui/painting/qpolygon.
h:47,
from ../Qt/4.3.4/include/QtGui/qpolygon.h:1,
from ../Qt/4.3.4/include/QtGui/../../src/gui/painting/qmatrix.h
:47,
from ../Qt/4.3.4/include/QtGui/qmatrix.h:1,
from ../Qt/4.3.4/include/QtGui/../../src/gui/painting/qtransfor
m.h:46,
from ../Qt/4.3.4/include/QtGui/qtransform.h:1,
from ../Qt/4.3.4/include/QtGui/../../src/gui/image/qimage.h:47,
from ../Qt/4.3.4/include/QtGui/qimage.h:1,
from ../Qt/4.3.4/include/QtGui/../../src/gui/image/qpixmap.h:51
,
from ../Qt/4.3.4/include/QtGui/qpixmap.h:1,
from ../Qt/4.3.4/include/QtGui/../../src/gui/image/qicon.h:49,
from ../Qt/4.3.4/include/QtGui/qicon.h:1,
from ../Qt/4.3.4/include/QtGui/../../src/gui/widgets/qabstractb
utton.h:47,
from ../Qt/4.3.4/include/QtGui/qabstractbutton.h:1,
from ../Qt/4.3.4/include/QtGui/../../src/gui/widgets/qpushbutto
n.h:47,
from ../Qt/4.3.4/include/QtGui/qpushbutton.h:1,
from ../Qt/4.3.4/include/QtGui/QPushButton:1,
from main.cpp:7:
../Qt/4.3.4/include/QtCore/../../src/corelib/tools/qvector.h: At global scope:
../Qt/4.3.4/include/QtCore/../../src/corelib/tools/qvector.h:253: error: `ptrdif
f_t' does not name a type
mingw32-make[1]: *** [release/main.o] Error 1
mingw32-make[1]: Leaving directory `C:/bla'
mingw32-make: *** [release] Error 2
C:\bla>was mache ich falsch?
lg shou