Hi
How to tell compiler where are *.res files.
I've try -Fu, -Fi, -Fo directives in fpc.cfg but always path of main source is used.

Mailing lists / fpc-devel / 2009-05
7 messages · 4 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Hi
How to tell compiler where are *.res files.
I've try -Fu, -Fi, -Fo directives in fpc.cfg but always path of main source is used.
Dariusz Mazur wroteHow to tell compiler where are *.res files.
You can't. As you noticed, they are always searched relative to the directory of the main source file (unless the resource file is specified using an absolute path)
Jonas
And that means, it is really impossible to include a *.rc file in a unit and distrubute the *.res file as compiled resource with your compiled unit.
Can't the searching be extended to the unit directory. It would make the file C:\fpc\2.2.4\units\i386-win32\fcl-base\fclel.res really useful, now have to copy it to my program dir to be able to use deamonapp unit.
Vincent
Vincent Snijders wroteCan't the searching be extended to the unit directory. It would make the file C:\fpc\2.2.4\units\i386-win32\fcl-base\fclel.res really useful, now have to copy it to my program dir to be able to use deamonapp unit.
WDDD? (What Does Delphi Do) If Delphi also somehow has support for resource search paths (via the unit search path or otherwise), it doesn't make sense to implement a different solution. (since in that case someone will probably file a bug report at some point asking for also supporting it in a Delphi-compatible way).
Jonas
Jonas Maebe pisze:
I have all *.res files in one separate directory in Delphi (via search path). Now I try to use *.res in Linux.
Everything goes fine, FPC can handle ordinary *.res, although *.rc has to be compiled by brcc32
And that means, it is really impossible to include a *.rc file in a unit and distrubute…
From: "Vincent Snijders"
.rc files are searched relative to the current unit path. .res files are placed into units output folder specified by -FU switch. After that you can distribute compiled units with compiled .res files without sources.
Yury.
Jonas Maebe pisze: I have all *.res files in one separate directory in Delphi (via search…
From: "Dariusz Mazur"
You can get/build crossbinutils for i386-win32. Then rename i386-win32-windres to windres. After that fpc will compile .rc files for you using that windres.
Yury.