diff --git a/Help/prop_tgt/WINDOWS_EXPORT_ALL_SYMBOLS.rst b/Help/prop_tgt/WINDOWS_EXPORT_ALL_SYMBOLS.rst index 00f32f61ea..5ba1bc15c3 100644 --- a/Help/prop_tgt/WINDOWS_EXPORT_ALL_SYMBOLS.rst +++ b/Help/prop_tgt/WINDOWS_EXPORT_ALL_SYMBOLS.rst @@ -10,11 +10,24 @@ Enable this boolean property to automatically create a module definition for a ``SHARED`` library (or executable with :prop_tgt:`ENABLE_EXPORTS`) on Windows. The module definition file will be passed to the linker causing all symbols to be exported from the ``.dll``. -For global *data* symbols, ``__declspec(dllimport)`` must still be used when -compiling against the code in the ``.dll``. All other function symbols will -be automatically exported and imported by callers. This simplifies porting -projects to Windows by reducing the need for explicit ``dllexport`` markup, -even in ``C++`` classes. + +This simplifies porting projects to Windows by reducing the need for +explicit ``dllexport`` markup, even in ``C++`` classes. Function +symbols will be automatically exported and may be linked by callers. +However, there are some cases when compiling code in a consumer may +require explicit ``dllimport`` markup: + +* Global *data* symbols must be explicitly marked with + ``__declspec(dllimport)`` in order to link to data in the ``.dll``. + +* In cases that the compiler generates references to the virtual function + table, such as in a delegating constructor of a class with virtual + functions, the whole class must be marked with ``__declspec(dllimport)`` + in order to link to the vftable in the ``.dll``. + +* See the `MSVC Linker /EXPORT Option`_ for more information on data symbols. + +.. _`MSVC Linker /EXPORT Option`: https://learn.microsoft.com/en-us/cpp/build/reference/export-exports-a-function When this property is enabled, zero or more ``.def`` files may also be specified as source files of the target. The exports named by these files