Implement a warning message when building an dynamic library .so, .dll or a .dylib, which are currently not supported. Closes #2562.