[ODE] Why no __declspec(dllexport)

gl gl at ntlworld.com
Tue Apr 27 20:07:19 MST 2004


> I think it would be remiss, however, to neglect the fact that very few
> *nix programmers have embraced C++. Therefore, I don't believe this
> issue has truly been addressed by the community at large. There is a
> stigma about g++'s code size and/or performance in the *nix community,
> and most just code in C.

Right, if so, I think that's part of what comes across as prejudice (along
with the usual anti-MS bias).

> So, in summary:
>
> a) you can hide class functions from being exported by putting them in a
> private implementation class, *or* via non-member static friends ( who
> cares if this is ugly, you are trying to hide the function, remember )
>
> b) dllimport/dllexport makes this whole mechanism cleaner, and the
> non-MSVC crowd has not embraced ( IMHO ) C++ enough to really explore
> whether or not it would be advantageous. ( Corrections welcome, I don't
> consider myself an expert on this 2nd point - it's just my observation )

I think that's fair - I'm sure a standard way to do this would be nice for
all concerned, but in the meantime, it's handy.

I think the other point about DLLs is that they're less secure because they
export symbols, and thus are easier to reverse engineer and/or abuse.  I
think that's why MS decided to make exporting explicit (they certainly
wouldn't like people hacking the OS DLLs ; ).
--
gl

>
>
> -- 
> -------------------------
> http://wecanstopspam.org/
>
>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>



More information about the ODE mailing list