In examples/advanced/xray_telescope/src/XrayTelRunAction.cc there is a ios::app that should be a G4std::ios::app, the line is the number 97 : G4std::ofstream outscat("detector.hist", ios::app);
This must be the problem of this particualr example. But this example is assumed to be used only with Linux, and it is stated in the readme. Anyway, I reassign this report to the responsible person of this example.
This advanced example uses functionality only currently available in Linux.