Hmmm... ouch. I have no idea. Is there any setting that you are using in the dev environment that you aren't using in the exe?
If you press and click on the ok tab under the tools-options it will paste all the environment settings to the command window. Place them in the program and then compile your exe and see if it still fails...
>I'm confused about the debugger. The exe runs in a separate folder. When I run the prg from the project I don't get the error message.