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. redefiniton of 'QObject'
Forum Updated to NodeBB v4.3 + New Features

redefiniton of 'QObject'

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 387 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.
  • CKurduC Offline
    CKurduC Offline
    CKurdu
    wrote on last edited by
    #1

    When I compiled my source code, I got this error only in macOS.

    /Users/ckurdu/Qt/5.15.2/clang_64/lib/QtNetwork.framework/Headers/qsslconfiguration.h:82: error: redefinition of 'QObject'
    In file included from /Users/ckurdu/Projects/local/qtcms/output/x64/x84/release/modules/dashboard/dashboard_autogen/mocs_compilation.cpp:3:
    In file included from /Users/ckurdu/Projects/local/qtcms/output/x64/x84/release/modules/dashboard/dashboard_autogen/EWIEGA46WW/moc_dashboard.cpp:10:
    In file included from /Users/ckurdu/Projects/local/qtcms/output/x64/x84/release/modules/dashboard/dashboard_autogen/EWIEGA46WW/../../../../../../../../qtcms/modules/dashboard/dashboard.h:11:
    In file included from /Users/ckurdu/Projects/local/qtcms/qtcms/components/factory2/websocketserver/wsserver.h:4:
    In file included from /Users/ckurdu/Qt/5.15.2/clang_64/lib/QtWebSockets.framework/Headers/QWebSocketServer:1:
    In file included from /Users/ckurdu/Qt/5.15.2/clang_64/lib/QtWebSockets.framework/Headers/qwebsocketserver.h:51:
    In file included from /Users/ckurdu/Qt/5.15.2/clang_64/lib/QtNetwork.framework/Headers/QSslConfiguration:1:
    /Users/ckurdu/Qt/5.15.2/clang_64/lib/QtNetwork.framework/Headers/qsslconfiguration.h:82:24: error: redefinition of 'QObject'
    class Q_NETWORK_EXPORT QSslConfiguration
                           ^
    /Users/ckurdu/Projects/local/qtcms/qtcms/components/httpserver/httpconnectionhandler.h:22:29: note: expanded from macro 'QSslConfiguration'
      #define QSslConfiguration QObject
                                ^
    /Users/ckurdu/Qt/5.15.2/clang_64/lib/QtCore.framework/Headers/qobject.h:127:21: note: previous definition is here
    class Q_CORE_EXPORT QObject
                        ^
    

    Do you have any clue about it?

    You reap what you sow it

    Chris KawaC 1 Reply Last reply
    0
    • CKurduC CKurdu

      When I compiled my source code, I got this error only in macOS.

      /Users/ckurdu/Qt/5.15.2/clang_64/lib/QtNetwork.framework/Headers/qsslconfiguration.h:82: error: redefinition of 'QObject'
      In file included from /Users/ckurdu/Projects/local/qtcms/output/x64/x84/release/modules/dashboard/dashboard_autogen/mocs_compilation.cpp:3:
      In file included from /Users/ckurdu/Projects/local/qtcms/output/x64/x84/release/modules/dashboard/dashboard_autogen/EWIEGA46WW/moc_dashboard.cpp:10:
      In file included from /Users/ckurdu/Projects/local/qtcms/output/x64/x84/release/modules/dashboard/dashboard_autogen/EWIEGA46WW/../../../../../../../../qtcms/modules/dashboard/dashboard.h:11:
      In file included from /Users/ckurdu/Projects/local/qtcms/qtcms/components/factory2/websocketserver/wsserver.h:4:
      In file included from /Users/ckurdu/Qt/5.15.2/clang_64/lib/QtWebSockets.framework/Headers/QWebSocketServer:1:
      In file included from /Users/ckurdu/Qt/5.15.2/clang_64/lib/QtWebSockets.framework/Headers/qwebsocketserver.h:51:
      In file included from /Users/ckurdu/Qt/5.15.2/clang_64/lib/QtNetwork.framework/Headers/QSslConfiguration:1:
      /Users/ckurdu/Qt/5.15.2/clang_64/lib/QtNetwork.framework/Headers/qsslconfiguration.h:82:24: error: redefinition of 'QObject'
      class Q_NETWORK_EXPORT QSslConfiguration
                             ^
      /Users/ckurdu/Projects/local/qtcms/qtcms/components/httpserver/httpconnectionhandler.h:22:29: note: expanded from macro 'QSslConfiguration'
        #define QSslConfiguration QObject
                                  ^
      /Users/ckurdu/Qt/5.15.2/clang_64/lib/QtCore.framework/Headers/qobject.h:127:21: note: previous definition is here
      class Q_CORE_EXPORT QObject
                          ^
      

      Do you have any clue about it?

      Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @CKurdu Looking at the source of these libraries QSslConfiguration in qsslconfiguration.h is specified if QT_NO_SSL is not defined and that macro in httpconnectionhandler.h is defined when QT_NO_SSL is defined, so... Qt includes think SSL is supported and that httpserver header thinks that it's not. I don't know how your project is configured but you've got a mismatch there.

      CKurduC 1 Reply Last reply
      1
      • Chris KawaC Chris Kawa

        @CKurdu Looking at the source of these libraries QSslConfiguration in qsslconfiguration.h is specified if QT_NO_SSL is not defined and that macro in httpconnectionhandler.h is defined when QT_NO_SSL is defined, so... Qt includes think SSL is supported and that httpserver header thinks that it's not. I don't know how your project is configured but you've got a mismatch there.

        CKurduC Offline
        CKurduC Offline
        CKurdu
        wrote on last edited by
        #3

        @Chris-Kawa Thank you,
        You gave me a good hint and I think I solved the problem.

        As you wrote, the problem is related to unlinked SSL.

        You reap what you sow it

        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