Link the main application when building stage.