[fpc-pascal]v1.0.10 w32 release Eventlog resource not found

Ronald Fox rfox at dls.queens.org
Mon Jul 14 02:46:05 CEST 2003


A significant enhancement found in the win32 release is the
EventLog unit.  I had a little trouble with compiling the
example program tstelcmd.pp because the linker couldn't
find a required resource file.  After finding the missing
file (fclel.res) in c:\pp\source\fcl\win32\ and copying it
to my source directory the program compiled (and ran) just
fine.

Is there a search path for resources or how should this be
properly fixed?

Regards,
Ron
-------------------------------------
{$mode objfpc}
{$h+}
{$ifdef win32}
{$r fclel.res}
{$endif}

program testelcmd;

uses eventlog;

Var
  E : TEventType;

begin
  With TEventLog.Create(Nil) do
    Try
      Identification:='Test eventlog class';
      RegisterMessageFile('');
      Active:=True;
      For E:=etInfo to etDebug do
        Log(E,'An event log message of type '+EventTypeToString(E));
    finally
      Free;  
    end;
end.
-----------------------------
C:\> set path
Path=C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;c:\pp\bin\win32;c:\util

C:\> cd my-fpc\testing\eventlog
C:\my-fpc\testing\eventlog>ppc386 tstelcmd.pp
Hint: End of reading config file c:\pp\bin\win32\fpc.cfg
Free Pascal Compiler version 1.0.10 [2003/06/27] for i386
Copyright (c) 1993-2003 by Florian Klaempfl
Target OS: Win32 for i386
Compiling tstelcmd.pp
syswin32.pp(9,1) Hint: Conditional I386 was set at startup in last compilation of syswin32.pp
Compiling resource fclel.res
c:\pp\bin\win32\windres.exe: can't open `fclel.res' for output: No such file or directory
tstelcmd.pp(25,1) Error: Error while linking
tstelcmd.pp(25,1) Fatal: There were 1 errors compiling module, stopping
Closing script ppas.bat

C:\my-fpc\testing\eventlog>
-- 
Ronald Fox                                Email: rfox at dls.queens.org
Diagnostic Laboratory Services, Inc.      Phone: (808) 589-5172
Honolulu, Hawaii






More information about the fpc-pascal mailing list