Results 1 to 4 of 4

Thread: Plugins for applications

  1. #1
    Join Date
    Jun 2010
    Posts
    142
    Thanks
    11
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Plugins for applications

    I wrote an app that uses plugins and has a header with the interface for them, just like it says in the docs.

    But how to compile the plugin? How to tell it the path of the interface header without writing the absolute path the the dir with my app?

    I'm using Qt Creator.

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Plugins for applications

    Somehow you need to tell the compiler where to find the header.

    You have a few possibilities:
    1. Install the header in a known place. On linux for example in /usr/include
    2. If you do not install it in a known place, make sure the system or the compiler knows where to look. You can use environment variables, or fixed paths, etc...
    3. Include the header in your plugin header files. Which I guess is the most easy way to go. But it might give problems when the included header doesn't match the installed library (after an upgrade for example)

  3. #3
    Join Date
    Jun 2010
    Posts
    142
    Thanks
    11
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Plugins for applications

    Quote Originally Posted by tbscope View Post
    1. Install the header in a known place. On linux for example in /usr/include
    That's probably a bad idea, I'm still just playing around with a prototype.

    Quote Originally Posted by tbscope View Post
    2. If you do not install it in a known place, make sure the system or the compiler knows where to look. You can use environment variables, or fixed paths, etc...
    How to do that?

    Quote Originally Posted by tbscope View Post
    3. Include the header in your plugin header files. Which I guess is the most easy way to go. But it might give problems when the included header doesn't match the installed library (after an upgrade for example)
    I thought about that, but I also thought that what if I change the header file in my main app?

    Also, how do I write the plugin's .pro file? Maybe it would be better to have the plugin in the same project as the application?

  4. #4
    Join Date
    Jun 2010
    Posts
    142
    Thanks
    11
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Plugins for applications

    Anyone?!?

    (10 char limit)

Similar Threads

  1. Mac OS, plugins that user designer plugins
    By Royceybaby in forum Qt Programming
    Replies: 0
    Last Post: 9th May 2010, 02:40
  2. How to design Qt applications are better?
    By FinderCheng in forum Qt Programming
    Replies: 8
    Last Post: 19th October 2009, 17:37
  3. How I Can Use LibXML2 in Qt4 Applications???
    By redhat in forum Qt Programming
    Replies: 4
    Last Post: 17th January 2009, 13:11
  4. [QT] I can't debug my applications
    By claudio-cit in forum Qt Programming
    Replies: 3
    Last Post: 3rd July 2008, 18:24

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.