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. [Solved] Plugin depending on a shared lib problem

[Solved] Plugin depending on a shared lib problem

Scheduled Pinned Locked Moved General and Desktop
6 Posts 2 Posters 1.9k 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.
  • G Offline
    G Offline
    Guigui
    wrote on last edited by
    #1

    Hi,

    I am trying to implement a Qt plugin built around a framework, in a shared library. Basically, the framework defines abstract types and mechanisms for Nodes creation, linkage and communication between those nodes. Different Qt plugins would be created to implement concrete node definitions and be used as a factory to provide these nodes to the client application.

    I am having some problems loading the plugin in the client application. I get the famous "Cannot load library /workspace/projects/shootbox_plugin/trunk/plugins/libsb-ipmdl.so: (/workspace/projects/shootbox_plugin/trunk/plugins/libsb-ipmdl.so: undefined symbol: _ZTI9NodeDatum)" and have no idea what to do. The undefined symbol, NodeDatum, is an abstract class from the framework lib.

    Would you have any idea about what would cause this or I did that I shouldn't have done?
    By the way, yes, my plugin interface is all pure virtual.

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

      Hi,

      Check that the library containing that symbol can be found when you start your application. i.e use ldd on your plugin to see if it can find all dependencies

      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
      • G Offline
        G Offline
        Guigui
        wrote on last edited by
        #3

        Hi,
        Thank you for your answer and sorry for the late reply. An accident made me lose 2 weeks of work on this and I had to start over again...

        I just got to this point where I was stuck and, unfortunately, the dependencies seem to be resolved correctly. That does not seem to be the problem.

        EDIT: Found some issues with some abstract type definitions (still a bit new to C++...). I am now stuck with an "Unknown error" which I have no clue how to debug.

        1 Reply Last reply
        0
        • G Offline
          G Offline
          Guigui
          wrote on last edited by
          #4

          I managed to make it work although I still get the "Unknown error" message.

          I am not familiar at all with the Qt source code, but digging into the source code of the QPluginLoader class, I found this:

          @QString QPluginLoader::errorString() const
          {
          return (!d || d->errorString.isEmpty()) ? tr("Unknown error") : d->errorString;
          }@

          Do I understand correctly that if the errorString is empty, "Unknown error" is thrown to the user instead of "No error" or something like that?!

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

            Indeed, but it's not necessarily wrong.

            I.E. If load returns true, you don't have to check the error string. But if it return false and the error string is empty, then it's an unknown error.

            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
            • G Offline
              G Offline
              Guigui
              wrote on last edited by
              #6

              Right. Well, thank you, I consider this solved!

              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