Tuesday, February 22, 2011

In Linux, how to export function symbols?

the global visibility you can set in the compiler flags by (the symbols are public by default.):
-fvisibility=default
or
-fvisibility=hidden

and then the equivalents attributes are:
__attribute__ ((visibility("default"))) // (similar to __declspec(dllexport))
or
__attribute__ ((visibility("hidden")))

No comments:

Post a Comment