[cmake] basic support for shared library
[msvc] resolving ambiguos symbols
[cmake] refactoring + support for shared libs
adding some exports for shared compilation