fix missig #endif, change build exampel to option