[ODE] Why no __declspec(dllexport)

Martin C. Martin martin at metahuman.org
Tue Apr 27 10:19:54 MST 2004


You're talking about the user's choice; I'm talking about Microsoft's 
choice.  The other option for Microsoft was to use the facilities 
already built into C and C++, the same facilities they use for static 
libs: functions are exported by default, but not if preceded by the 
keyword "static."

gl wrote:

>>It strikes me as another attempt by Microsoft to provide a non-standard
>>way of doing something, to make it harder for people to support both
>>Windows & other platforms.  When you're the biggest platform, this helps
>>you and hurts others.  But maybe it was well intentioned mechanism that
>>in retrospect has some big disadvantages.
> 
> Sigh.  It's useful.  You can apply it to everything - eg. an entire class,
> or just some select members (as well as global variables/functions).

Can't you so the same thing with a statically compiled library?  If so, 
I don't think it's missed much.  I've never heard anyone argue for dlls 
over static libs simply because of ease of specifying what's exported or 
not.

> I've never done it, but I believe the alternative is to manually compile
> (and manually maintain) a .def file?  If so, I'm glad it's there.

That's the alternative for the user; I'm talking about Microsoft's 
design alternatives.

- Martin




More information about the ODE mailing list