_exporting DLL symbols_
The cygwin/mingw `ld' has several ways to export symbols for dll's.
_using auto-export functionality_
By default `ld' exports symbols with the auto-export
functionality, which is controlled by the following command
line options:
* -export-all-symbols [This is the default]
* -exclude-symbols
* -exclude-libs
* -exclude-modules-for-implib
* -version-script
When auto-export is in operation, `ld' will export all the
non-local (global and common) symbols it finds in a DLL, with
the exception of a few symbols known to belong to the
system's runtime and libraries. As it will often not be
desirable to export all of a DLL's symbols, which may include
private functions that are not part of any public interface,
the command-line options listed above may be used to filter
symbols out from the list for exporting. The `--output-def'
option can be used in order to see the final list of exported
symbols with all exclusions taken into effect.
If `--export-all-symbols' is not given explicitly on the
command line, then the default auto-export behavior will be
_disabled_ if either of the following are true:
* A DEF file is used.
* Any symbol in any object file was marked with the
__declspec(dllexport) attribute.
Bookmarks