Re: Exporting Symbols...
Re: Exporting Symbols...
- Subject: Re: Exporting Symbols...
- From: Chris Espinosa <email@hidden>
- Date: Fri, 22 Jul 2005 09:27:19 -0700
On Jul 22, 2005, at 7:46 AM, Dave Thorup wrote:
Is using an Exported Symbols File really the only way to control what symbols are exported with Xcode 2.1 and GCC 3.3? Is GCC 4.0 any better?
If this really is the only way to control exported symbols then it really seems like a giant step backwards to the stone age of computers. Why not just specify the exported symbols with Punch Cards? That wouldn't be too much harder.
In CodeWarrior all you need to do is:
#pragma export on
// define your functions, globals, etc.
#pragma export off
How easy is that? I don't think it gets any easier. Even on Windows with VC++ all you need to do is prepend things with "__declspec(dllexport)". Not quite as easy as CodeWarrior, but light-years ahead of GCC.
Please don't tell me that I'm going to have to use nm to sort through thousands of lines of symbols to try and figure out what is and isn't going to be exported in half a dozen libraries (most of which I didn't write or design). I'd rather chew on glass.
Hasn't anyone tried to automate this by parsing source files and automatically generating the exported symbols based on pragmas or "__declspec(dllexport)"?
Try the visibility attributes in gcc 4.0. They're meant to be parallel to __declspec. In fact you can define a macro that expands to
<x-tad-bigger>__declspec(dllexport)</x-tad-bigger> on Windows and
<x-tad-bigger>__attribute__((visibility("default"))) </x-tad-bigger>on Mac.
http://developer.apple.com/documentation/DeveloperTools/Conceptual/CppRuntimeEnv/Articles/SymbolVisibility.html
Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden