Build process adapted for gcc build
Added necessary extern