[Moved] Build problem, exactly with QHttpRequestHeader
-
Hi all,
I got some problem with QHttpRequestHeader.
When I am trying to compile code like this:
@#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QtNetwork/QHttpRequestHeader>MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
QHttpRequestHeader *header = new QHttpRequestHeader();}@
compiler returns following errors:
@collect 2: ld returned 1 exit status@
and
@
tmp/obj/debug_shared/mainwindow.o:D:\Qt\2010.05\qt\test-build-desktop/../test/mainwindow.cpp:27: undefined reference to `_imp___ZN18QHttpRequestHeaderC1Ev'collect2: ld returned 1 exit status
mingw32-make[1]: *** [debug\test.exe] Error 1
mingw32-make: *** [debug-all] Error 2
@I have no idea how to fix this.
Peter.EDIT:
I probably posted it in wrong section. My topic should be in "installation and deployment" . Sorry for that :) -
I moved the post to the right forum.
You should add this to your .pro file:
@
QT += network
@This adds the QtNetwork lib to your project.
-
Thanks a lot!
Now, it's working well. -
A bit off topic, but isn't Installation&Deployment related to Qt installations, i.e. this kind of bugs shouldn't go in the "Desktop" forum?
-
Kind-of a bordercase. It fits both forums...