There are a list of problems regarding developing a GUI plugin as shared library that will be loaded by an application that uses the same toolkit or another.
The toolkit has a global state, and when loaded into the address space of the application will get into conflict with the state that is already created. This problem arise when there is a different version of the sample toolkit used for the host and for the shared library. If it is not the same, there is a need the plugin to create the state, for example, create QtApplication, but this will interfere with other plugins that will do the same.
So, to solve this problem there is a need for a toolkit that doesn’t have a global state. There is a project that develops a free software minimalist GUI toolkit for audio plugins called DISTRHO. I have studied the code in order to see if I can use it for my projects. It is a framework for plugins, but also it contains a GUI toolkit that is build on top of a small API called pugl that is an interface to basic Windows interactions and creation for X Windows System for GNU/Linux, Windows API for Microsoft Windows, and for Mac. I think is a good one. But since I like to code and do things from scratch I decided to develop one for my needs, but will be even more minimalistic, little different and oriented to my projects. From the beginning it will interface only with X Windows System and Windows API, i.e. only for GNU/Linux and Windows. I’ll use also C++11 and above for it. Developing it, maybe there new ideas will come or problems will arise. It will be under GPL of course.