[Matroska-devel] Finally you can hide (more?) symbols with GCC

Moritz Bunkus moritz at bunkus.org
Wed Sep 22 10:12:45 CEST 2004


> http://www.nedprod.com/programs/gccvisibility.html

Windows compatibility

For anyone who has worked on any sizeable portable application on both
Windows and POSIX, you'll know the sense of frustration that non-Windows
builds of GCC don't offer an equivalent to __declspec(dllexport) ie; the
ability to mark your C/C++ interface as being that of the shared
library. I say frustration because good DSO interface design is just as
important for healthy coding as good class design, or correctly opaquing
internal data structures. POSIX programmers generally just don't get

While the semantics can't be the same with Windows DLL's and ELF DSO's,
almost all Windows-based code uses a macro to compile-time select
whether dllimport or dllexport is being used. This mechanism can be
easily reused with this patch so adding support to anything already able
to be compiled as a Windows DLL is literally a five minute operation.

ARGH! I seem to be one of those who don't get it. But it HUGELY
overcomplicates things!


If Darl McBride was in charge, he'd probably make marriage
unconstitutional too, since clearly it de-emphasizes the commercial
nature of normal human interaction, and probably is a major impediment
to the commercial growth of prostitution. - Linus Torvalds

More information about the Matroska-devel mailing list