PDA

View Full Version : Plugins for applications



MTK358
4th November 2010, 01:05
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.

tbscope
4th November 2010, 04:32
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)

MTK358
4th November 2010, 12:36
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.


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?


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?

MTK358
5th November 2010, 01:21
Anyone?!?

(10 char limit)