Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
|
|
Source code |
1 2 3 4 5 6 7 8 9 |
g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_CORE_LIB -DQT_GUI_LIB -DQT_SHARED -I/scratch/fei/qt-x11-4.0.0/mkspecs/default -I. -I../../../include/QtGui -I../../../include/QtCore -I../../../include -I. -I. -I. -o main.o main.cpp g++ -Wl,-rpath,/scratch/fei/qt-x11-4.0.0/lib -o httpdownload main.o -L/scratch/fei/qt-x11-4.0.0/lib -L/scratch/fei/qt-x11-opensource-desktop-4.0.0/lib -lQtGui_debug -L/usr/X11R6/lib -lpng -lSM -lICE -lXi -lXrender -lXrandr -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 -lm -lQtCore_debug -lz -ldl -lpthread main.o(.text+0x139): In function `main': /scratch/fei/qt-x11-4.0.0/examples/kingsoft/httpdownload/main.cpp:13: undefined reference to `QHttp::QHttp(QObject*)' main.o(.text+0x1bb):/scratch/fei/qt-x11-4.0.0/examples/kingsoft/httpdownload/main.cpp:23: undefined reference to `QHttp::closeConnection()' main.o(.text+0x1f0):/scratch/fei/qt-x11-4.0.0/examples/kingsoft/httpdownload/main.cpp:27: undefined reference to `QHttp::~QHttp()' main.o(.text+0x236):/scratch/fei/qt-x11-4.0.0/examples/kingsoft/httpdownload/main.cpp:27: undefined reference to `QHttp::~QHttp()' collect2: ld returned 1 exit status make: *** [httpdownload] Error 1 |
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
#include <QApplication>
#include <QFile>
//#include <QtNetwork/QHttp>
#include <Qt/QHttp>
#include <QPushButton>
#include <QIODevice>
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
QHttp http;
QFile file("temp.html");
if (!file.open(QIODevice::WriteOnly)) {
return;
}
//http.setHost("www.trolltech.com");
// http.get("index.html", &file);
http.closeConnection();
file.close();
return app.exec();
}
|
This post has been edited 1 times, last edit by "fei" (Aug 6th 2005, 9:13am)
This post has been edited 1 times, last edit by "fei" (Aug 7th 2005, 8:47am)