I have a static library 'a' that is used by a shared library 'b'. This shared library is linked with --export-dynamic, so as I understand it exports the symbols in 'a' too. Now, I have a shared library 'c' that is linked with both 'a' and 'b'. I want library 'a' to have higher "priority" while linking, so its exported symbols through 'c' are ignored (i.e. I don't depend on 'b' for the functionality in 'a'). Is it possible? I did some experiments to put the static library before the the shared one when linking, but it works only "sometimes".
Asked
Active
Viewed 814 times
1
-
Perhaps using the visibility function attribute (a GCC extension) with `weak` might help. See http://stackoverflow.com/a/9648740/841108 – Basile Starynkevitch Mar 13 '12 at 20:01
-
Hm, It's a big library, and it doesn't seem as practical solution. – jj99 Mar 13 '12 at 20:06