Click here to Skip to main content
15,903,012 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: IE Bands Pin
bisserke10-Jul-02 21:35
bisserke10-Jul-02 21:35 
GeneralRe: IE Bands Pin
Alex11-Jul-02 0:39
Alex11-Jul-02 0:39 
GeneralBegginers problem compiling QT app. Pin
harleyrana10-Jul-02 18:33
harleyrana10-Jul-02 18:33 
GeneralRe: Begginers problem compiling QT app. Pin
Christian Graus10-Jul-02 19:33
protectorChristian Graus10-Jul-02 19:33 
GeneralRe: Begginers problem compiling QT app. Pin
Martin Marvinski10-Jul-02 20:01
Martin Marvinski10-Jul-02 20:01 
GeneralRe: Begginers problem compiling QT app. Pin
Christian Graus10-Jul-02 20:16
protectorChristian Graus10-Jul-02 20:16 
GeneralRe: Begginers problem compiling QT app. Pin
Nish Nishant10-Jul-02 21:02
sitebuilderNish Nishant10-Jul-02 21:02 
GeneralRe: Begginers problem compiling QT app. Pin
harleyrana11-Jul-02 17:02
harleyrana11-Jul-02 17:02 
This is the most simple example i wanted to start off with.
I created a new win32 project, the other project files are blank ( resources.h ,QT2.h )
Is it the way im creating the project?
The QT .lib,.h file paths are added to the project settings.
Is there a particular order they should be in?
Thanks for any help!

// QT2.cpp

#include "stdafx.h"
#include "QT2.h"


#include <qapplication.h>
#include <qpushbutton.h>


int main( int argc, char **argv )
{
QApplication a( argc, argv );

QPushButton hello( "Hello world!", 0 );
hello.resize( 100, 30 );

a.setMainWidget( &hello );
hello.show();
return a.exec();
}


The full erros list :

i:\qt\include\qpixmap.h(71): error C2238: unexpected token(s) preceding ';'
i:\qt\include\qcstring.h(7): error C2065: 'QApplication' : undeclared identifier
i:\qt\include\qcstring.h(7): error C2146: syntax error : missing ';' before identifier 'app'
i:\qt\include\qcstring.h(7): error C2065: 'app' : undeclared identifier
i:\qt\include\qcstring.h(8): error C2065: 'Editor' : undeclared identifier
i:\qt\include\qcstring.h(8): error C2146: syntax error : missing ';' before identifier 'editor'
i:\qt\include\qcstring.h(8): error C2065: 'editor' : undeclared identifier
i:\qt\include\qcstring.h(10): error C2530: 'editor' : references must be initialized
i:\qt\include\qcstring.h(11): error C2825: 'editor::show': cannot form a qualified name
i:\qt\include\qcstring.h(11): error C2039: 'show' : is not a member of 'operator``global namespace'''
i:\qt\include\qcstring.h(11): error C2146: syntax error : missing ';' before identifier 'show'
i:\qt\include\qcstring.h(11): error C2065: 'show' : undeclared identifier
i:\qt\include\qcstring.h(12): error C2064: term does not evaluate to a function
i:\qt\include\qstring.h(331): error C2504: 'QShared' : base class undefined
i:\qt\include\qstring.h(355): error C2629: unexpected 'QString ('
i:\qt\include\qstring.h(355): error C2238: unexpected token(s) preceding ';'
i:\qt\include\qstring.h(366): error C2143: syntax error : missing ',' before '&'
i:\qt\include\qstring.h(504): error C2146: syntax error : missing ';' before identifier 'utf8'
i:\qt\include\qstring.h(504): error C2501: 'QString::QCString' : missing storage-class or type specifiers
i:\qt\include\qstring.h(504): warning C4183: 'utf8': missing return type; assumed to be a member function returning 'int'
i:\qt\include\qstring.h(507): error C2146: syntax error : missing ';' before identifier 'local8Bit'
i:\qt\include\qstring.h(507): error C2501: 'QString::QCString' : missing storage-class or type specifiers
i:\qt\include\qstring.h(507): warning C4183: 'local8Bit': missing return type; assumed to be a member function returning 'int'
i:\qt\include\qstring.h(546): error C2143: syntax error : missing ',' before '&'
i:\qt\include\qstring.h(644): error C2039: 'ref' : is not a member of 'QStringData'
i:\qt\include\qstring.h(649): error C2039: 'deref' : is not a member of 'QStringData'
i:\qt\include\qstring.h(331) : see declaration of 'QStringData'
i:\qt\include\qstring.h(820): error C2146: syntax error : missing ';' before identifier 'qt_winQString2MB'
i:\qt\include\qregion.h(76): error C2143: syntax error : missing ';' before '<'
i:\qt\include\qregion.h(76): error C2501: 'QRegion::QArray' : missing storage-class or type specifiers
i:\qt\include\qregion.h(76): error C2238: unexpected token(s) preceding ';'
i:\qt\include\qregion.h(116): error C2143: syntax error : missing ',' before '&'
i:\qt\include\qmime.h(52): error C2146: syntax error : missing ';' before identifier 'encodedData'
i:\qt\include\qmime.h(52): error C2433: 'QMimeSource::QByteArray' : 'virtual' not permitted on data declarations
i:\qt\include\qmime.h(52): error C2501: 'QMimeSource::QByteArray' : missing storage-class or type specifiers
i:\qt\include\qmime.h(52): error C2253: 'QMimeSource::encodedData' : pure specifier only applies to virtual function - specifier ignored
i:\qt\include\qmime.h(52): warning C4183: 'encodedData': missing return type; assumed to be a member function returning 'int'
i:\qt\include\qmime.h(115): error C2146: syntax error : missing ';' before identifier 'convertToMime'
i:\qt\include\qmime.h(115): error C2433: 'QWindowsMime::QByteArray' : 'virtual' not permitted on data declarations
i:\qt\include\qmime.h(115): error C2501: 'QWindowsMime::QByteArray' : missing storage-class or type specifiers
i:\qt\include\qmime.h(115): error C2061: syntax error : identifier 'QByteArray'
i:\qt\include\qmime.h(115): error C2253: 'QWindowsMime::convertToMime' : pure specifier only applies to virtual function - specifier ignored
i:\qt\include\qmime.h(115): warning C4183: 'convertToMime': missing return type; assumed to be a member function returning 'int'
i:\qt\include\qmime.h(116): error C2146: syntax error : missing ';' before identifier 'convertFromMime'
i:\qt\include\qmime.h(116): error C2433: 'QWindowsMime::QByteArray' : 'virtual' not permitted on data declarations
i:\qt\include\qmime.h(116): error C2501: 'QWindowsMime::QByteArray' : missing storage-class or type specifiers
i:\qt\include\qmime.h(116): error C2061: syntax error : identifier 'QByteArray'
i:\qt\include\qmime.h(116): error C2253: 'QWindowsMime::convertFromMime' : pure specifier only applies to virtual function - specifier ignored
i:\qt\include\qmime.h(116): warning C4183: 'convertFromMime': missing return type; assumed to be a member function returning 'int'
i:\qt\include\qevent.h(361): error C2146: syntax error : missing ';' before identifier 'encodedData'
i:\qt\include\qevent.h(361): error C2501: 'QDropEvent::QByteArray' : missing storage-class or type specifiers
i:\qt\include\qevent.h(361): warning C4183: 'encodedData': missing return type; assumed to be a member function returning 'int'
i:\qt\include\qevent.h(364): error C2146: syntax error : missing ';' before identifier 'data'
i:\qt\include\qevent.h(364): error C2501: 'QDropEvent::QByteArray' : missing storage-class or type specifiers
i:\qt\include\qevent.h(364): warning C4183: 'data': missing return type; assumed to be a member function returning 'int'
i:\qt\include\qcstring.h(6): error C2084: function 'int main(int,char ** )' already has a body
i:\qt\include\qcstring.h(5) : see previous definition of 'main'
i:\qt\include\qcstring.h(7): error C2146: syntax error : missing ';' before identifier 'app'
i:\qt\include\qcstring.h(8): error C2146: syntax error : missing ';' before identifier 'editor'
i:\qt\include\qcstring.h(10): error C2530: 'editor' : references must be initialized
i:\qt\include\qcstring.h(11): error C2825: 'editor::show': cannot form a qualified name
i:\qt\include\qcstring.h(11): error C2143: syntax error : missing ';' before 'show'
i:\qt\include\qcstring.h(12): error C2064: term does not evaluate to a function
i:\qt\include\qiodevice.h(128): error C2143: syntax error : missing ',' before '&'
i:\qt\include\qiodevice.h(129): error C2146: syntax error : missing ';' before identifier 'readAll'
i:\qt\include\qiodevice.h(129): error C2501: 'QIODevice::QByteArray' : missing storage-class or type specifiers
i:\qt\include\qiodevice.h(129): warning C4183: 'readAll': missing return type; assumed to be a member function returning 'int'
i:\qt\include\qdatastream.h(52): error C2629: unexpected 'QDataStream ('
i:\qt\include\qdatastream.h(52): error C2238: unexpected token(s) preceding ';'
i:\qt\include\qobject.h(161): error C2146: syntax error : missing ';' before identifier 'normalizeSignalSlot'
i:\qt\include\qobject.h(161): warning C4183: 'normalizeSignalSlot': missing return type; assumed to be a member function returning 'int'
i:\qt\include\qstyle.h(81): error C2061: syntax error : identifier 'QApplication'
i:\qt\include\qstyle.h(82): error C2061: syntax error : identifier 'QApplication'
i:\qt\include\qtranslator.h(92): error C2146: syntax error : missing ';' before identifier 'cx'
i:\qt\include\qtranslator.h(92): error C2501: 'QTranslatorMessage::QCString' : missing storage-class or type specifiers
i:\qt\include\qtranslator.h(92): error C2501: 'QTranslatorMessage::cx' : missing storage-class or type specifiers
i:\qt\include\qtranslator.h(93): error C2146: syntax error : missing ';' before identifier 'st'
i:\qt\include\qtranslator.h(93): error C2501: 'QTranslatorMessage::QCString' : missing storage-class or type specifiers
i:\qt\include\qtranslator.h(93): error C2501: 'QTranslatorMessage::st' : missing storage-class or type specifiers
i:\qt\include\qtranslator.h(94): error C2146: syntax error : missing ';' before identifier 'cm'
i:\qt\include\qtranslator.h(94): error C2501: 'QTranslatorMessage::QCString' : missing storage-class or type specifiers
i:\qt\include\qtranslator.h(94): error C2501: 'QTranslatorMessage::cm' : missing storage-class or type specifiers
i:\qt\include\qapplication.h(57): error C2143: syntax error : missing ';' before '*'
i:\qt\include\qapplication.h(57): error C2371: 'QApplication' : redefinition; different basic types
i:\qt\include\qapplication.h(57): error C2501: 'qApp' : missing storage-class or type specifiers
i:\qt\include\qapplication.h(397): error C2227: left of '->notify' must point to class/struct/union
i:\qt\include\qpixmap.h(71): error C2629: unexpected 'QPixmap ('
i:\qt\include\qpixmap.h(122): error C2143: syntax error : missing ',' before '&'
i:\C++ Testing\QT2\QT2.cpp(14): error C2146: syntax error : missing ';' before identifier 'a'
i:\C++ Testing\QT2\QT2.cpp(14): error C2065: 'a' : undeclared identifier
i:\C++ Testing\QT2\QT2.cpp(19): error C2228: left of '.setMainWidget' must have class/struct/union type
i:\C++ Testing\QT2\QT2.cpp(21): error C2228: left of '.exec' must have class/struct/union type
GeneralUsability question... Pin
Matt Gullett10-Jul-02 15:32
Matt Gullett10-Jul-02 15:32 
GeneralRe: Usability question... Pin
Shog910-Jul-02 16:41
sitebuilderShog910-Jul-02 16:41 
GeneralRe: Usability question... Pin
benjymous11-Jul-02 4:00
benjymous11-Jul-02 4:00 
QuestionPThread in VC++??? Pin
ChiYung10-Jul-02 15:16
ChiYung10-Jul-02 15:16 
AnswerRe: PThread in VC++??? Pin
Rage10-Jul-02 22:17
professionalRage10-Jul-02 22:17 
AnswerRe: PThread in VC++??? Pin
Anonymous10-Jul-02 22:43
Anonymous10-Jul-02 22:43 
GeneralRe: problem with CColorDialog... Pin
Steve L.10-Jul-02 12:37
Steve L.10-Jul-02 12:37 
GeneralRe: problem with CColorDialog... Pin
Joaquín M López Muñoz10-Jul-02 12:37
Joaquín M López Muñoz10-Jul-02 12:37 
GeneralSaving information in Registry. Pin
Speedy10-Jul-02 11:32
Speedy10-Jul-02 11:32 
GeneralRe: Saving information in Registry. Pin
ColinDavies10-Jul-02 11:42
ColinDavies10-Jul-02 11:42 
GeneralRe: Saving information in Registry. Pin
Nish Nishant10-Jul-02 17:46
sitebuilderNish Nishant10-Jul-02 17:46 
GeneralRe: Saving information in Registry. Pin
sudip11-Jul-02 6:45
sudip11-Jul-02 6:45 
GeneralVisual C++ and MFC Pin
Sid Kraft10-Jul-02 11:26
Sid Kraft10-Jul-02 11:26 
GeneralRe: Visual C++ and MFC Pin
Chris Losinger10-Jul-02 11:34
professionalChris Losinger10-Jul-02 11:34 
GeneralRe: Visual C++ and MFC Pin
Desmond Mardle12-Jul-02 8:54
Desmond Mardle12-Jul-02 8:54 
GeneralOnPrint() Help Pin
Desmond Mardle10-Jul-02 11:00
Desmond Mardle10-Jul-02 11:00 
GeneralRe: OnPrint() Help Pin
Joaquín M López Muñoz10-Jul-02 12:45
Joaquín M López Muñoz10-Jul-02 12:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.