mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-cross-env-list] Static vs. shared libraries


From: Mark de Wever
Subject: Re: [Mingw-cross-env-list] Static vs. shared libraries
Date: Mon, 21 Sep 2009 10:14:36 +0200
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

Volker Grabsch wrote:
Mark de Wever <address@hidden> schrieb:
For a project I'm working I use gtkmm [...] I haven't been able to create static libraries, but I managed to create shared libraries. For those shared libraries I also created shared libraries of some existing packages.

This is a question of the future direction of the project, so
it would be great to get some opinions on that topic from you,
the mingw-cross-env developers and users:

    What is your general opinion about static/shared libs?
    What is your concrete practical need?

Just for your information, it was not my intention to change the direction of the project.

<snip a long nice explanation>

Conclusion
==========

All in all, I see the following possible solutions. Maybe some of
them don't work, but at least they're worth a try. Please give your
opinion on each point, and don't hesitate to add other suggestions.

Static libraries:

    (A) Fix GTK to find their symbols in (statically linked) EXE files.

I tried this initially as well but it didn't work. If upstream also suggests to use shared libraries I'm not sure whether it's worth the effort to get it working statically. IMO it should at least get support from upstream, otherwise it might turn out to be a lot of maintenance every time when a new GTK version is released.

Also when packaging a program linked against GTK you need to ship some additional files (like the translated string) separately [1]. So you still need to ship more external files.

    (B) Find a way to build GTK as shared library, but everything else
        as static library.

I prefer this option for GTK and libraries build upon it.

If GTKMM gets added some of the existing packages need to be available
shared as well. I prefer to have those packages available in both a shared and a static version. So the question boils down to, should the project support additional libraries that depend on GTK? IMO if supporting GTKMM is wanted it should be supported properly, meaning compile everything into working DLLs and not depend on external projects.

<snip C + D since answered above>

Shared libraries:

I'm not fond of the idea to convert to shared libraries for libraries that can be used statically linked. At the moment I only use it for a project that uses GTKMM so can't use the shared libraries, but I still love the static library idea behind this project.

[1] http://live.gnome.org/gtkmm/MSWindows#head-852bee9f60cac079f3d51104601b98e8e78af505

Regards,
Mark de Wever




reply via email to

[Prev in Thread] Current Thread [Next in Thread]