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. Undefined Symbols for QT Plugins on Closing App
Forum Updated to NodeBB v4.3 + New Features

Undefined Symbols for QT Plugins on Closing App

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 250 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.
  • P Offline
    P Offline
    Parker Newman
    wrote on last edited by
    #1

    I have a application that using many plugins with a custom interface. They work great however sometime when I close the GUI using the X, I get the following error:

    <executable name >symbol lookup error: <the plugin path>/libDisplayTest.so: undefined symbol: _ZN19TestPluginInterfaceD2Ev
    <executeable name> exited with code 127

    TestPluginInterface is my plugin interface.

    It seems like my plugins are not being unloaded automatically on the exit of the program?

    Here is a snippit of how I load a plugin (error checking removed).

    TestPluginInterface* TestManager::loadPlugin(QString pluginName)
    {
        QPluginLoader pluginLoader(pluginPath,this);
        pluginObject = pluginLoader.instance();
        testPlugin = qobject_cast<TestPluginInterface*>(pluginObject);
        return(testPlugin);
    }
    

    Any ideas? I do not explicitly delete the plugin pointer anywhere.

    1 Reply Last reply
    0
    • P Offline
      P Offline
      Parker Newman
      wrote on last edited by
      #2

      I figure this out.
      I had to change the destructor od my interface from

      virtual ~TestPluginInterface() = 0;
      

      to:

      virtual ~TestPluginInterface() = default;
      
      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