Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. [Moved] Build problem, exactly with QHttpRequestHeader
Forum Updated to NodeBB v4.3 + New Features

[Moved] Build problem, exactly with QHttpRequestHeader

Scheduled Pinned Locked Moved Installation and Deployment
5 Posts 3 Posters 3.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pixo
    wrote on last edited by
    #1

    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 :)

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #2

      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.

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • P Offline
        P Offline
        pixo
        wrote on last edited by
        #3

        Thanks a lot!
        Now, it's working well.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dangelog
          wrote on last edited by
          #4

          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?

          Software Engineer
          KDAB (UK) Ltd., a KDAB Group company

          1 Reply Last reply
          0
          • G Offline
            G Offline
            goetz
            wrote on last edited by
            #5

            Kind-of a bordercase. It fits both forums...

            http://www.catb.org/~esr/faqs/smart-questions.html

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved