Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved] QT Example "Fortune server" fails to build
Forum Update on Monday, May 27th 2025

[Solved] QT Example "Fortune server" fails to build

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 977 Views
  • 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.
  • D Offline
    D Offline
    di98mase
    wrote on last edited by
    #1

    I have tried to run the Fortune Server example in QT but it fails to build. This is what I did:
    I created a QT Application project using the project wizard.
    The project is based on "QDialog"
    I copied the contents from the example into my project.

    First time I build I got a lot of warnings for "include <QNetwork>". I found out that the network related classes now are found in "include <QNetwork/QNetwork>". From what I understand the structure has changed from the time when the example is created and the current version of QT.

    I suspect that my .pro file is incorrect or that I have based my project on wrong class library somehow.

    After adding a few "includes" myself I get loads of "Issues" like this one:
    C:\Qt\Tools\QtCreator\bin\tsmc_server\tsmc_server.cpp:19: error: undefined reference to `_imp___ZN28QNetworkConfigurationManagerC1EP7QObject'

    This is my .pro file:

    QT += core gui

    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

    TARGET = test
    TEMPLATE = app

    SOURCES += main.cpp
    tsmc_server.cpp

    HEADERS += tsmc_server.h

    FORMS += tsmc_server.ui

    What did I do wrong

    1 Reply Last reply
    0
    • IamSumitI Offline
      IamSumitI Offline
      IamSumit
      wrote on last edited by
      #2

      Hii.

      I can't see QT += network
      please add the above.

      hope it helps.

      Be Cute

      1 Reply Last reply
      0
      • D Offline
        D Offline
        di98mase
        wrote on last edited by
        #3

        Problem solved!

        I added it like this:

        QT += core gui
        QT += network

        I am not sure what "QT +=network" means but I will look it up in the documents!

        Thanks IamSumit

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          Short version, it means: "will use the Qt network module"

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          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