cleaned up
some MSVC fixes
explicitly marking functions for export; some MSVC fixes
cleaned up cmakelists
force C linkage
tiny fix