exports from a .so

I am writing a library for Linux/Windows and I thought that I could default the export rule to hidden by using -fvisibility=hidden and -fvisibility-includes-hidden but the results are not as I expected (everything is still exported). Does each class that is not exported need __attribute__ ((visibility("hidden"))), or is there a way to globally hide all classes and functions? I would like to make this look as much like windows as possible and only declare __attribute__ ((visibility("default"))) for exports and not have to have a declaration for things that are exported and a declaration for hidden classes/functions. I am using GCC 4.2.1.
Topic archived. No new replies allowed.