libiconv always defines BUILDING_DLL for its build. In the case of MSVC that in turn defines
# define RELOCATABLE_DLL_EXPORTED __declspec(dllexport)
That's unacceptable for a static library because if that library is linked into a user DLL, all its public symbols are automatically exported from the DLL.
BUILDING_DLL should be defined only when shared libraries are built.
- Dmitry Bely