I moved Windows before SysUtils and it seems to work now. Thank you. I will also try that code you suggested, ASerge.
Does the last unit in the uses clause take priority? I still haven't completed compiling and I'm no longer getting errors, but I hovered over DeleteFile() and it says that it's referencing sysutils\filutil.h, which comes after Windows now. Googling around I found someone who said if there are name collisions, the last unit in the Uses list wins, so that sounds right.
I also looked at the header and I think the Lazarus built-in code importer shuffled the uses ordering around, which caused this problem, so maybe I need to watch for that.