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. Static build application with QtHttpServer
Forum Updated to NodeBB v4.3 + New Features

Static build application with QtHttpServer

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 258 Views 2 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.
  • B Offline
    B Offline
    BrMisha
    wrote on last edited by
    #1

    Hello!
    I'm using Qt 5.15 (static built from sources). Additionally i have built and installed QtHttpServer from qt-labs (for static and non-static version).
    With non-static it build and works wonderful, but on static build i'm getting errors:

    C:\Qt\Qt-5.15.0-static\lib\libQt5SslServer.a(qsslserver.o):qsslserver.cpp:(.text$_ZN10QSslServerC2EP7QObject+0x0): multiple definition of `QSslServer::QSslServer(QObject*)'
    C:\Qt\Qt-5.15.0-static\lib\libQt5WebSockets.a(qsslserver.o):qsslserver.cpp:(.text$_ZN10QSslServerC2EP7QObject+0x0): first defined here
    C:\Qt\Qt-5.15.0-static\lib\libQt5SslServer.a(qsslserver.o):qsslserver.cpp:(.text$_ZN10QSslServerC2EP7QObject+0x0): multiple definition of `QSslServer::QSslServer(QObject*)'
    C:\Qt\Qt-5.15.0-static\lib\libQt5WebSockets.a(qsslserver.o):qsslserver.cpp:(.text$_ZN10QSslServerC2EP7QObject+0x0): first defined here
    C:\Qt\Qt-5.15.0-static\lib\libQt5SslServer.a(qsslserver.o):qsslserver.cpp:(.text$_ZN10QSslServerD2Ev+0x0): multiple definition of `QSslServer::~QSslServer()'
    C:\Qt\Qt-5.15.0-static\lib\libQt5WebSockets.a(qsslserver.o):qsslserver.cpp:(.text$_ZN10QSslServerD2Ev+0x0): first defined here
    C:\Qt\Qt-5.15.0-static\lib\libQt5SslServer.a(qsslserver.o):qsslserver.cpp:(.text$_ZN10QSslServerD2Ev+0x0): multiple definition of `QSslServer::~QSslServer()'
    C:\Qt\Qt-5.15.0-static\lib\libQt5WebSockets.a(qsslserver.o):qsslserver.cpp:(.text$_ZN10QSslServerD2Ev+0x0): first defined here
    C:\Qt\Qt-5.15.0-static\lib\libQt5SslServer.a(qsslserver.o):qsslserver.cpp:(.text$_ZN10QSslServerD0Ev+0x0): multiple definition of `QSslServer::~QSslServer()'
    C:\Qt\Qt-5.15.0-static\lib\libQt5WebSockets.a(qsslserver.o):qsslserver.cpp:(.text$_ZN10QSslServerD0Ev+0x0): first defined here
    C:\Qt\Qt-5.15.0-static\lib\libQt5SslServer.a(qsslserver.o):qsslserver.cpp:(.text$_ZN10QSslServer18incomingConnectionEx+0x0): multiple definition of `QSslServer::incomingConnection(long long)'
    C:\Qt\Qt-5.15.0-static\lib\libQt5WebSockets.a(qsslserver.o):qsslserver.cpp:(.text$_ZN10QSslServer18incomingConnectionEx+0x0): first defined here
    C:\Qt\Qt-5.15.0-static\lib\libQt5SslServer.a(qsslserver.o):qsslserver.cpp:(.text$_ZN10QSslServer19setSslConfigurationERK17QSslConfiguration+0x0): multiple definition of `QSslServer::setSslConfiguration(QSslConfiguration const&)'
    C:\Qt\Qt-5.15.0-static\lib\libQt5WebSockets.a(qsslserver.o):qsslserver.cpp:(.text$_ZN10QSslServer19setSslConfigurationERK17QSslConfiguration+0x0): first defined here
    C:\Qt\Qt-5.15.0-static\lib\libQt5SslServer.a(moc_qsslserver.o):moc_qsslserver.cpp:(.text$_ZNK10QSslServer10metaObjectEv+0x0): multiple definition of `QSslServer::metaObject() const'
    C:\Qt\Qt-5.15.0-static\lib\libQt5WebSockets.a(moc_qsslserver_p.o):moc_qsslserver_p.cpp:(.text$_ZNK10QSslServer10metaObjectEv+0x0): first defined here
    C:\Qt\Qt-5.15.0-static\lib\libQt5SslServer.a(moc_qsslserver.o):moc_qsslserver.cpp:(.text$_ZN10QSslServer18qt_static_metacallEP7QObjectN11QMetaObject4CallEiPPv+0x0): multiple definition of `QSslServer::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)'
    C:\Qt\Qt-5.15.0-static\lib\libQt5WebSockets.a(moc_qsslserver_p.o):moc_qsslserver_p.cpp:(.text$_ZN10QSslServer18qt_static_metacallEP7QObjectN11QMetaObject4CallEiPPv+0x0): first defined here
    C:\Qt\Qt-5.15.0-static\lib\libQt5SslServer.a(moc_qsslserver.o):moc_qsslserver.cpp:(.text$_ZN10QSslServer11qt_metacastEPKc+0x0): multiple definition of `QSslServer::qt_metacast(char const*)'
    C:\Qt\Qt-5.15.0-static\lib\libQt5WebSockets.a(moc_qsslserver_p.o):moc_qsslserver_p.cpp:(.text$_ZN10QSslServer11qt_metacastEPKc+0x0): first defined here
    C:\Qt\Qt-5.15.0-static\lib\libQt5SslServer.a(moc_qsslserver.o):moc_qsslserver.cpp:(.text$_ZN10QSslServer11qt_metacallEN11QMetaObject4CallEiPPv+0x0): multiple definition of `QSslServer::qt_metacall(QMetaObject::Call, int, void**)'
    C:\Qt\Qt-5.15.0-static\lib\libQt5WebSockets.a(moc_qsslserver_p.o):moc_qsslserver_p.cpp:(.text$_ZN10QSslServer11qt_metacallEN11QMetaObject4CallEiPPv+0x0): first defined here
    C:\Qt\Qt-5.15.0-static\lib\libQt5SslServer.a(moc_qsslserver.o):moc_qsslserver.cpp:(.rdata$_ZN10QSslServer16staticMetaObjectE+0x0): multiple definition of `QSslServer::staticMetaObject'
    C:\Qt\Qt-5.15.0-static\lib\libQt5WebSockets.a(moc_qsslserver_p.o):moc_qsslserver_p.cpp:(.rdata$_ZN10QSslServer16staticMetaObjectE+0x0): first defined here
    collect2.exe: error: ld returned 1 exit status
    mingw32-make[1]: *** [Makefile.Release:485: ../build-Release/groundcontrolserver.exe] Error 1
    mingw32-make: *** [Makefile:45: release] Error 2
    

    How can i resolve this problem?

    1 Reply Last reply
    0
    • D Offline
      D Offline
      DungeonLords
      wrote on last edited by DungeonLords
      #2

      usually in Qt 5 I use script like this
      qmake ../qt5/qtcharts/qtcharts.pro INCLUDEPATH+=../qt5/qtcharts/include/QtCharts CONFIG+=release
      make -j8
      make install
      And there will statically build qtcharts.
      I want to do the same with QtHttpServer. But I can't find any .pro files in qthttpserver/src
      How I can build QtHttpServer with Qt 6?

      SGaistS 1 Reply Last reply
      0
      • D DungeonLords

        usually in Qt 5 I use script like this
        qmake ../qt5/qtcharts/qtcharts.pro INCLUDEPATH+=../qt5/qtcharts/include/QtCharts CONFIG+=release
        make -j8
        make install
        And there will statically build qtcharts.
        I want to do the same with QtHttpServer. But I can't find any .pro files in qthttpserver/src
        How I can build QtHttpServer with Qt 6?

        SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @DungeonLords hi from the looks of the source tree you can use either qmake or cmake. The CMakeLists.txt is geared for Qt 6.

        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