Re: [fpc-devel] Error seeking resources when copiling with {$R *.res}
Is {$R *.res} handled differently to {$R *.lfm}? (My projects have lots of {$R *.lfm} On 05/11/16 11:31, Thaddy de Koning wrote: On Fri, 4 Nov 2016 11:46:24 +0200 (EEST) {$R *.res} in ONLY allowed for the project file. You should never try to link in a * resource in a unit, because the * resolves to the main project name. Same as in Delphi. If you need a resource in a unit, resolve the full name, like {$R myunit1.res} The main *.res is available over all units in a project. "NetSpirit"wrote: CONDITIONS Unit file contains {$R *.res} directive. File *.res exists in the same directory where *.pp file for unit exists. Compiled units resides in subdirectory, for example called 'units' (-FU command line switch). DESCRIPTION When project with such unit compiled first time - all work as expected. Compiled *.ppu files goes to 'units', resulting binary created. On the second and next compilations we encounter en error: "Error: Can't open file 'D:\projectpath\units\Unit1.res'". This error is a result of searching *.res in a directory where compiled units exists, but not in a directory where unit source file resided. FPC VERSION: FPC 3.0.0, precompiled binaries for win32, win64 OS: Windows TEST PROJECT: Demo project for this bug in attach or download here: http://rgho.st/8GRBWVWcM (Extract all files to disk; correct path to your FPC in 'compile.bat'; run 'compile.bat' two times) ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] Error seeking resources when copiling with {$R *.res}
On Fri, 4 Nov 2016 11:46:24 +0200 (EEST) {$R *.res} in ONLY allowed for the project file. You should never try to link in a * resource in a unit, because the * resolves to the main project name. Same as in Delphi. If you need a resource in a unit, resolve the full name, like {$R myunit1.res} The main *.res is available over all units in a project. "NetSpirit"wrote: > CONDITIONS > Unit file contains {$R *.res} directive. File *.res exists in the same > directory where *.pp file for unit exists. > Compiled units resides in subdirectory, for example called > 'units' (-FU command line switch). > > DESCRIPTION > When project with such unit compiled first time - all work as > expected. Compiled *.ppu files goes to 'units', resulting binary > created. > > On the second and next compilations we encounter en error: > "Error: Can't open file 'D:\projectpath\units\Unit1.res'". > > This error is a result of searching *.res in a directory where > compiled units exists, but not in a directory where unit source file > resided. > > FPC VERSION: FPC 3.0.0, precompiled binaries for win32, win64 > OS: Windows > > TEST PROJECT: > Demo project for this bug in attach or download here: > http://rgho.st/8GRBWVWcM > (Extract all files to disk; correct path to your FPC in > 'compile.bat'; run 'compile.bat' two times) > > > > > ___ > fpc-devel maillist - fpc-devel@lists.freepascal.org > http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
[fpc-devel] Error seeking resources when copiling with {$R *.res}
CONDITIONS Unit file contains {$R *.res} directive. File *.res exists in the same directory where *.pp file for unit exists. Compiled units resides in subdirectory, for example called 'units' (-FU command line switch). DESCRIPTION When project with such unit compiled first time - all work as expected. Compiled *.ppu files goes to 'units', resulting binary created. On the second and next compilations we encounter en error: "Error: Can't open file 'D:\projectpath\units\Unit1.res'". This error is a result of searching *.res in a directory where compiled units exists, but not in a directory where unit source file resided. FPC VERSION: FPC 3.0.0, precompiled binaries for win32, win64 OS: Windows TEST PROJECT: Demo project for this bug in attach or download here: http://rgho.st/8GRBWVWcM (Extract all files to disk; correct path to your FPC in 'compile.bat'; run 'compile.bat' two times) ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel