I need to create a shared library .so and keep everything except a selected list of functions hidden. I think I should be able to make everything hidden by default by adding -fvisibility=hidden -fvisibility-inlines-hidden to my CFLAGS in the Makefile Settings, then putting __attribute__((visibility(“default”))) in front of the functions I want to be visible. Adding the visibility arguments to the CFlags has no effect on the results I get from running nm on the .so I compile. Everything stays at default visibility.
I’ve also tried manually adding __attribute__((visibility(“hidden”))) to every function I don’t want included in the .so but this doesn’t have any effect either.