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. Is is possible to link a customized static libraries to dynamic libarries of LibQtCore and libQtGui?
Qt 6.11 is out! See what's new in the release blog

Is is possible to link a customized static libraries to dynamic libarries of LibQtCore and libQtGui?

Scheduled Pinned Locked Moved Unsolved General and Desktop
12 Posts 3 Posters 4.4k Views 3 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.
  • Q Offline
    Q Offline
    Qt Enthusiast
    wrote on last edited by A Former User
    #1

    I have a internal memory manager code , which is made as statically linked library . is is possible to link a customized static libraries to dynamic libarries of LibQtCore and libQtGui

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

      Hi,

      If you mean linking your application against static and dynamic dependencies, then yes you can.

      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
      • Q Offline
        Q Offline
        Qt Enthusiast
        wrote on last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0
        • Q Offline
          Q Offline
          Qt Enthusiast
          wrote on last edited by
          #4

          No I have a application in which I have libqwt.so and then have libQtCore. and libQtGui.a I have source code of qwt . When I make the dynamic libaray of libqwt.so at that time can specify It can link to static libraries libQtCore. and libQtGui.a I

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

            Then you have a static build of Qt, in that case use that version of Qt to build Qwt.

            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
            • Q Offline
              Q Offline
              Qt Enthusiast
              wrote on last edited by Qt Enthusiast
              #6

              I tried the my tool crahes I did following steps

              1)checkout code for qwt from my central repositry
              2) It is for linux centos platform
              3) set the qmake path where Qt Static libs have been built
              for example
              setenv PATH "path to qmake where where Qt Static libs have been built"
              3) build the dynamic libraries

              but in this case my tools crahes

              One very basic question , If I have memory manger which is made as static library

              1. libmymem.a
              2. libgui.a application gui code is static library
              3. we are using shared libraries of .so libQtgui.so , libQtCore.so , libqwt.so libscintilla.so

              Is it not conceptually possible the the libgui.a can access the code from libmymem.a even if we use the shared libraries from of Qt libQtgui.so , libQtCore.so , libqwt.so libscintilla.so

              -----------Also how can verify the newly compiled qwt.so and qscintilla.so is taking QT symbols from my static library of QT libQtCore.a and libQtGui.a

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

                What do you mean by crash ?

                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
                • Q Offline
                  Q Offline
                  Qt Enthusiast
                  wrote on last edited by Qt Enthusiast
                  #8

                  Segmentation fault . i want to make

                  1. Shared libraries QWt and Qscintilla an it should not depend on /include the code of QtCore and QtGui
                  2. Static libraries QWt and Qscintilla an it should not depend on /include the code of QtCore and QtGui

                  If i give

                  #QT -= gui core
                  #LIBS -= -lQtGui -lQtCore
                  option in qwtconfig.pri then my compliation for qwt fails

                  1 Reply Last reply
                  0
                  • Q Qt Enthusiast

                    I tried the my tool crahes I did following steps

                    1)checkout code for qwt from my central repositry
                    2) It is for linux centos platform
                    3) set the qmake path where Qt Static libs have been built
                    for example
                    setenv PATH "path to qmake where where Qt Static libs have been built"
                    3) build the dynamic libraries

                    but in this case my tools crahes

                    One very basic question , If I have memory manger which is made as static library

                    1. libmymem.a
                    2. libgui.a application gui code is static library
                    3. we are using shared libraries of .so libQtgui.so , libQtCore.so , libqwt.so libscintilla.so

                    Is it not conceptually possible the the libgui.a can access the code from libmymem.a even if we use the shared libraries from of Qt libQtgui.so , libQtCore.so , libqwt.so libscintilla.so

                    -----------Also how can verify the newly compiled qwt.so and qscintilla.so is taking QT symbols from my static library of QT libQtCore.a and libQtGui.a

                    kshegunovK Offline
                    kshegunovK Offline
                    kshegunov
                    Moderators
                    wrote on last edited by
                    #9

                    @Qt-Enthusiast said in is is possible to link a customized static libraries to dynamic libarries of LibQtCore and libQtGui:

                    Also how can verify the newly compiled qwt.so and qscintilla.so is taking QT symbols from my static library of QT libQtCore.a and libQtGui.a

                    I already told you in your previous thread not to do that! What you're attempting is to duplicate the symbols (i.e. putting QtCore both in qwt and scintilla) and then link both of those shared objects.

                    It's a mess! Symbols are getting hidden silently (or overwritten on Linux), globals are duplicated (or overwritten on Linux) and initialized in different binaries (without guarantee for order of initialization) ...
                    Even if you're able to make it work on Linux, which I really doubt, the moment you switch to Windows you're going to be neck deep in horse sh*t ...

                    Read and abide by the Qt Code of Conduct

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

                      To add to @kshegunov, if you don't want any code from Qt in Qwt and Qsinctilla, why are you using them in the first place ?

                      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
                      • Q Offline
                        Q Offline
                        Qt Enthusiast
                        wrote on last edited by
                        #11

                        I will a final executable in which libQtCore.a and libQGui.a and I will libQwt.so and libQscintall.so and as I mentioned the requirement is to make libQwt.so and libQscintall.so without having dependency on libQCore.so and libQtGui.so

                        1 Reply Last reply
                        0
                        • kshegunovK Offline
                          kshegunovK Offline
                          kshegunov
                          Moderators
                          wrote on last edited by
                          #12

                          Oh, boy ...

                          Read and abide by the 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