Link-time optimization flag enabled, closing program when window is closed.