I have a console program I recently ported to Lazarus LCL. This program basically reads a command file, simulates a population process and writes results in text files.
Everything was working well until one week ago when I started having problems opening files for writing. The code I use is very standard:
f: TextFile;
{$I-}
assignFile (f, fileName);
rewrite (f);
{$I+}
if IOResult <> 0 then
reportError;
My problem is the following:
When I run the program with Lazarus LCL, as a GUI application, I can no longer open files for writing and I receive error 103 (This is new. Everything was working fine one week ago).
When I run the program as a console application, IOResult returns 0.
This is with the same output directory, or using other directories.
No problem either when I run the console app from XCode (I use a Mac).
The same problem exists when I compile and run the GUI application in Windows (Virtual PC) writing files in the Windows file system (so it is not a problem with the Mac file system).
On the Mac I use Lazarus 2.0.10 and FPC 3.2.0 and with Windows it's Lazarus 2.0.6 and FPC 3.0.4
Any idea on what is causing this??
Many thanks in advance,
Daniel