Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2003-07

v1.0.10 w32 release Eventlog resource not found

4 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Ronald Fox

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: Diagnostic Laboratory Services, Inc. Phone: (808) 589-5172 Honolulu, Hawaii

Reply by email

Michael Van Canneyt
to Ronald Fox
Ronald Fox wrote 10 lines
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?

The .res file should be put next to the installed .ppu file. To fix it, you can simply copy it there, but it is an error in the distribution files. (and in the Make install target)

Michael.

Reply by email

Ronald Fox
to Michael Van Canneyt
Michael Van Canneyt wrote 6 lines
> Is there a search path for resources or how should this be > properly fixed? The .res file should be put next to the installed .ppu file. To fix it, you can simply copy it there, but it is an error in the distribution files. (and in the Make install target)

c:> dir /s c:\pp\*.ppu doesn't find any files but there is a c:\pp\units\win32\fcl\eventlog.ppw, so I copied fclel.res from c:\pp\source\fcl\win32 to c:\pp\units\win32\fcl, removed fclel.res from my source directory and recompiled. Same output as before:

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

Mahalo,
Ron

Reply by email

Michael Van Canneyt
to Ronald Fox
Ronald Fox wrote 24 lines
On Mon, 14 Jul 2003, Michael Van Canneyt wrote: > > Is there a search path for resources or how should this be > > properly fixed? > > The .res file should be put next to the installed .ppu file. > To fix it, you can simply copy it there, but it is an error in the > distribution files. (and in the Make install target) c:> dir /s c:\pp\*.ppu doesn't find any files but there is a c:\pp\units\win32\fcl\eventlog.ppw, so I copied fclel.res from c:\pp\source\fcl\win32 to c:\pp\units\win32\fcl, removed fclel.res from my source directory and recompiled. Same output as before: 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

In that case you'll have no choice but to copy the file to your project directory. It's a bug which will have to be fixed in the compiler.

Michael.

Reply by email