Results 1 to 7 of 7

Thread: plugin loading problem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2006
    Location
    Warsaw, Poland
    Posts
    45
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: plugin loading problem

    I've changed those lines to be same but still can't load it...

  2. #2
    Join Date
    Aug 2006
    Posts
    221
    Thanks
    3
    Thanked 29 Times in 19 Posts

    Default Re: plugin loading problem

    The Qt plugin classes are really hard to use. Usually you have no idea why loading fails. I noticed that plugins are extremely sensitive to bugs in the .pro files.

    If even one of your .h or .cpp files includes a .h which is not in your .pro file, even if not used at all, plugin loading might fail.

    I usually even create a fake .cpp file for each interface file to put it in the .pro file.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: plugin loading problem

    Quote Originally Posted by Kumosan
    The Qt plugin classes are really hard to use. Usually you have no idea why loading fails.
    Never tried it, but "static plugins" might produce linker errors.

    Anyway the problem with the above plugin was that the interface wasn't a real interface.
    It should be:
    Qt Code:
    1. public:
    2. virtual QString author() = 0;
    3. virtual QString version() = 0;
    4. virtual QString description() = 0;
    5. virtual QString name() = 0;
    To copy to clipboard, switch view to plain text mode 

  4. #4
    Join Date
    May 2007
    Location
    Netherlands
    Posts
    11
    Thanked 3 Times in 3 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: plugin loading problem

    Hi,

    I am busy trying to figure out what goes wrong. I developed some plugins for the qt designer and sometimes it did not load either. To test if a plugin will load, you can do the following:

    create a file called main.cpp with just this:

    int main(int argc, char* argv[])
    {
    return 0;
    }

    then compile (libfirstplugin.so is the plugin you like to test)

    g++ test.cpp libfirstplugin.so

    In case of your code, I got:

    libfirstplugin.so: undefined reference to `typeinfo for PluginInterface'
    libfirstplugin.so: undefined reference to `vtable for PluginInterface'

    So this is I guess why the plugin is not loading. I am searching for an answer on these messages

Similar Threads

  1. Dynamic lookup problem
    By jwintz in forum Qt Programming
    Replies: 3
    Last Post: 30th May 2006, 14:19
  2. creating table plugin
    By mgurbuz in forum Qt Programming
    Replies: 3
    Last Post: 28th April 2006, 13:50
  3. general sqlplugin problem
    By a550ee in forum Installation and Deployment
    Replies: 5
    Last Post: 28th February 2006, 10:03
  4. Runtime dynamic linking + Qt4 problem
    By _Ramirez_ in forum Qt Programming
    Replies: 5
    Last Post: 11th February 2006, 14:28
  5. Replies: 7
    Last Post: 3rd February 2006, 10:20

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.