This has been discussed before here : https://github.com/dtschump/gmic/pull/29
Basically, it is now possible to link each executable with a compiled
libgmic (with current git version).
It is not desirable though, as the different interfaces enable different features when compiling the file
gmic.cpp (and each feature comes with dependencies to external libraries).
For instance, it is desirable for the cli interface to have all the input/output format support enabled for JPEG, PNG, TIFF, etc… This is not desirable for the plug-in. The plug-in gets image data mainly from the host software and it doesn’t have to know how to read float-valued TIFF files.
Making the plug-in depend on a common
libgmic that would be used for all interface means adding a lot of dependencies for the users of the plug-in only.
We already have issues with users complaining about the high number of needed
.dll files on Windows, or mismatching library versions when using the linux executable provided on the web page. I don’t want to manage useless extra-dependencies for the users of the plug-in.
I understand that if you want to install all G’MIC interfaces together (which is apparently what the Gentoo packager wants to do), then it is useless to compile
gmic.cpp multiple times, but this is not the common use case. On other distros, packagers split the different G’MIC interfaces into several packages, so that people who wish to get the plug-in installed only are free to do so.
So, definitely I won’t make a shared
libgmic library file shared amongst all the G’MIC interfaces the default. But I repeat what I already said : this is currently quite easy to compile a shared
libgmic and use it for all the G’MIC interfaces (plug-in, cli,…). The packager can do it.
I’d be glad to help if anybody ask, except the packager we are talking about who is clearly too rude and unmannerly.