[fpc-pascal] Getting a resource file in the proper FPC directory: makefiles etc?

Reinier Olislagers reinierolislagers at gmail.com
Thu Oct 4 19:27:00 CEST 2012


On 3-10-2012 9:05, Reinier Olislagers wrote:
> Developing my database listener for fpcunit, I see 2 locations where the
> ppu files end up:
> <fpc>\packages\fcl-fpcunit\units\i386-win32\dbreporter.ppu
> <fpc>\units\i386-win32\fcl-fpcunit\dbreporter.ppu
> 
> However, a dbreporter.res resource file only ends up in the first location.
> 
> Which makefile(s) do I have to change in trunk (and how) in order to get
> that done?

To add insult to injury, on 64 bit Windows, running make fails while
compiling the resource file with an error that dbreporter.sql can't be
found.
contents of dbreporter.rc
dbreporter_sql file dbreporter.sql


Compiling .\fcl-fpcunit\src\dbreporter.pas
Compiling resource
C:\development\fpctrunk\packages\fcl-fpcunit\src\dbreporter.rc
Error!
Line 1 of Resource Script
(C:\development\fpctrunk\packages\fcl-fpcunit\src\dbreporter.RC):-
Could not find file:-
dbreporter.sql

RES file not made
dbreporter.pas(963) Error: Error while compiling resources
dbreporter.pas(963) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted

... but dbreporter.sql sits in
C:\development\fpctrunk\packages\fcl-fpcunit\src
Any hints?

By now, I think the easiest option is to write a preprocessor that
simply takes the sql and outputs a unit with a const containing the
contents as a huge string...

Thanks,
Reinier



More information about the fpc-pascal mailing list