#include <QApplication>
#include <QHttp>
#include <QUrl>
#include <QFileInfo>
#include <QFile>
#include <QtDebug>
class QHttp;
int main(int argc,char *argv[])
{
QApplication qapp(argc,argv);
QHttp *http;
http=new QHttp(); // in there
return qapp.exec();
}
output:
1>------ Build started: Project: QTest, Configuration: Debug Win32 ------
1>Performing Makefile project actions
1>Microsoft (R) Program Maintenance Utility Version 8.00.50727.42
1>Copyright (C) Microsoft Corporation. All rights reserved.
1> cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"C:/Qt/4.2.2/include/QtCore" -I"C:/Qt/4.2.2/include/QtCore" -I"C:/Qt/4.2.2/include/QtGui" -I"C:/Qt/4.2.2/include/QtGui" -I"C:/Qt/4.2.2/include" -I"." -I"C:/Qt/4.2.2/include/ActiveQt" -I"debug" -I"." -I"c:\Qt\4.2.2\mkspecs\win32-msvc2005" -Fodebug\ @C:\DOCUME~1\Liu\LOCALS~1\Temp\nmF1.tmp
1>main.cpp
1> link /LIBPATH:"c:\Qt\4.2.2\lib" /NOLOGO /DEBUG /DEBUG /MANIFESTFILE:"debug\QTest.intermediate.manifest" /SUBSYSTEM:WINDOWS /OUT:debug\QTest.exe @C:\DOCUME~1\Liu\LOCALS~1\Temp\nmF2.tmp
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QHttp::QHttp(class QObject *)" (__imp_??0QHttp@@QAE@PAVQObject@@@Z) referenced in function _main
1>main.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall QHttp::metaObject(void)const " (?metaObject@QHttp@@UBEPBUQMetaObject@@XZ)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall QHttp::qt_metacast(char const *)" (?qt_metacast@QHttp@@UAEPAXPBD@Z)
1>NMAKE : fatal error U1077: '"c:\Program Files\Microsoft Visual Studio 8\VC\bin\link.EXE"' : return code '0x460'
1>main.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall QHttp::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QHttp@@UAEHW4Call@QMetaObject@@HPAPA X@Z)
1>Stop.
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QHttp::~QHttp(void)" (__imp_??1QHttp@@UAE@XZ) referenced in function "public: virtual void * __thiscall QHttp::`scalar deleting destructor'(unsigned int)" (??_GQHttp@@UAEPAXI@Z)
1>debug\QTest.exe : fatal error LNK1120: 5 unresolved externals
1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"
1>Build log was saved at "file://c:\Documents and Settings\Liu\My Documents\Visual Studio 2005\Projects\QTest\QTest\Debug\BuildLog.htm"
1>QTest - 8 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
----------------------------------------
why????
Bookmarks