(1) Try saving your program to a file with the name equal to the program name (program test in test.pas). Not quite sure, but I think it may help.
(2) There is unti Windows in fpc, which is probably used by default, and this makes your unit or program Windows impossible.
Regards!