Update: I can compile it using Lazarus under Windows ok

As I expected, when I try compiling it for the arm-linux GP2X handheld, it doesn't compile as it uses the windows Windows unit

Any ideas on a replacement?
cheers,
Paul