First, the code you included is already mutilated beyond repair by you. So post the original.
My guess is that a simple Delphi project containing the unit will be automatically converted using the convert delphi project option. That will also convert ConsoleIO.pas.
{Actually that is not a guess...}
Anyway, you also need to add {$mode delphi}{$H+}