Use dynamic libraries in another dynamic libraries

  • 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:
    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.

  • Lifetime Qt Champion

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

  • @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 But I have to use my in many machines so I have to put the three libraries in a folder but not put them in totally different places.

  • Qt Champions 2018

  • Lifetime Qt Champion

    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

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

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.