I built a dylib (dynamic library) on Mac OS X using XCode 2.4.1 yesterday.
When I open the .dylib file with a Text Editor I can see all my variables, functions, etc… as human readable text in there.
I don’t want this, so I created a “Exported Symbols File” where only the 6 functions I want to be accessible are declared in (with underscores preceeding them).
Well, guess what, after recompiling and opening with Text Editor I still see all the other symbols in there that should not be there.
What I want is something like __declspec(dllexport) on Windows. When use __declspec(dllexport) before functions, only these functions will be human readable in the resulting .DLL, all other symbols will be thrown away.
How can I do this on Mac?
Perhaps this question seems stupid, but I’ve searched through the whole Internet and also read the Apple Developer notes, but I couldn’t get it the way I want.