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. Use dynamic libraries in another dynamic libraries

Use dynamic libraries in another dynamic libraries

Scheduled Pinned Locked Moved Unsolved General and Desktop
designer
6 Posts 3 Posters 1.3k 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.
  • Z Offline
    Z Offline
    Zouyi
    wrote on last edited by Zouyi
    #1

    I am always using QDesignerCustomWidgetInteface. I want to use two kinds of CustomWidget in another CustomWidget to combine two of them so that I need not to write some codes again.
    So I write codes as below in project file.
    LIBS +=-L. /debug -lxzquxianplugin
    LIBS +=-L./debug -lxzyctextplugin

    When I finished the code I debug the codes in creator and started debugging designer. Designer ran well and recognized my new CustomWidget. But when I entered bin/gcc/debug folder and ran executable app Designer that debug mode produced directly without codes and Qt creator, Designer showed that could not find shared library: libxzquxianplugin.so.
    I tried to use codes as below.
    Debug{LIBS +=absolute path way of xzquxianplugin
    LIBS +=absolute path way of xzyctextplugin}
    But it still failed to find dynamic library when I ran Designer in debug folders. I cannot understand why it happened.

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

      Hi
      You seems to be on linux
      if you ldd the designerplugin1 , where does it think it should get libxzquxianplugin.so.
      from ?

      Z 1 Reply Last reply
      0
      • mrjjM mrjj

        Hi
        You seems to be on linux
        if you ldd the designerplugin1 , where does it think it should get libxzquxianplugin.so.
        from ?

        Z Offline
        Z Offline
        Zouyi
        wrote on last edited by
        #3

        @mrjj I guess u mean that I should put the two libraries that I called in my design into the path way which is showed after execute ldd my design.so. But I have to use my design.so in many machines so I have to put the three libraries in a folder but not put them in totally different places.

        jsulmJ mrjjM 2 Replies Last reply
        0
        • Z Zouyi

          @mrjj I guess u mean that I should put the two libraries that I called in my design into the path way which is showed after execute ldd my design.so. But I have to use my design.so in many machines so I have to put the three libraries in a folder but not put them in totally different places.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Zouyi Take a look at http://doc.qt.io/qt-5/linux-deployment.html

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1
          • Z Zouyi

            @mrjj I guess u mean that I should put the two libraries that I called in my design into the path way which is showed after execute ldd my design.so. But I have to use my design.so in many machines so I have to put the three libraries in a folder but not put them in totally different places.

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @Zouyi
            Actually i just wanted to KNOW where it looks.
            Normally, it looks for plugins in a "plugins" subdirectory inside the directory of the application executable

            Z 1 Reply Last reply
            0
            • mrjjM mrjj

              @Zouyi
              Actually i just wanted to KNOW where it looks.
              Normally, it looks for plugins in a "plugins" subdirectory inside the directory of the application executable

              Z Offline
              Z Offline
              Zouyi
              wrote on last edited by
              #6

              @mrjj Yes. The three are all in bin/gcc/debug/plugin/designer

              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