Added share extension, fixed various linker/target errors