[Openicc] double linking of symbols
Glenn Randers-Pehrson
glennrp at comcast.net
Sat Sep 29 04:19:35 PDT 2007
At 08:55 AM 9/29/2007 +0200, Kai-Uwe Behrmann wrote:
>Dear programmers,
>
>Oyranos shall include symbols statically from lcms to create ICC profiles.
>Lcms may later be loaded as a CMM, which would mean a application sees
>two versions of the same library. Such way a conflict seems unavoidable.
>
>Does you have a light weight idea how to resolve such a conflict in C?
>
>I came only to simply renaming all symbols. But it's inconvenient and
>would lead to a separate version of lcms, which needs extra maintainance.
I don't know if you would consider this "light weight", but what we do
to avoid library conflicts in Mozilla is to add an extra header file
that uses macros to change all the names of exported things. See for
example
mozilla/modules/libimg/png/mozpngconf.h
which says
#define png_chunk_error MOZ_PNG_chunk_err
#define png_chunk_warning MOZ_PNG_chunk_warn
#define png_combine_row MOZ_PNG_combine_row
etc., etc.
There is not a lot of extra maintainance because this is all confined
to the mozpngconf.h file.
Glenn
More information about the openicc
mailing list