C++ -fvisibility=hidden -fvisibility-inlines-hidden

-fvisibility=hidden makes all your symbols hidden by default.

What you then have to do, is choose which functions you want to be visible to users linking against your library and make them visible by marking them with a visible attribute.

E.g.

void __attribute__((visibility("default"))) Exported()
{
    // ...
}

Leave a Comment