Added support for shared lib building and c++ based routines