I have a following question about linking on Linux:
Suppose I have a class Foo that uses Qt. To build this class I'd have to use qmake to generate Makefile.
Later on I want to use this class Foo for a Perl module, which is a shared library. However, to build it I have to use Perl's MakeMaker to generate Makefile of it's own.
The way I'm doing it right now is that I build class Foo as a static library, and when building Perl module's shared library I'm linking it against Foo's static library.
The problem is that when building Perl module's shared library I have to link it against all those Qt libraries that Foo's static library is linked against.
So the question is:
Does this approach even make sense?!
Is it possible to build Foo's static library in a way that I wouldn't have to specify all it's dependencies when building the Perl module's shared library? (Because it is somewhat hard to add all those dependencies to module's Makefile)
Would it be any different if Foo's library was shared, not static?