How to apply -fvisibility option to symbols in static libraries?
Simply pass -Wl,–exclude-libs,ALL to gcc This will tell the linker to transform all the symbols in the static libraries to hidden. –exclude-libs also accepts a list of archives (i.e. static library names) for finer granularity on which libraries to hide symbols from. Note: this will only work in systems using GNU binutils (e.g. Linux) or … Read more