Sign in Join

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

Mailing lists / fpc-pascal / 2022-06

Workaround for fpcres requiring absolute path

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Russ

Hi,

I use windres on Windows and Linux 32 and 64 bit (via mingw), but that doesn't work on ARM Linux - so I thought I would try using fpcres on Lazarus 2.3.0 and FPC 3.31 using the -FF option, but found that fpcres seems to require an absolute path whereas windres can use a relative path.

Given the line in the resource file:
TEMPLATE_UTILS_HEADER RCDATA "./resources/utils.h"

fpcres returns 'Error: Unable to open file "./resources/utils.h": No such file or directory.'

I can of course use an absolute path in the resource list, but is there any way to use a relative path so that the project can be moved?

Is this perhaps a Lazarus issue and not fpcres?

Regards
Russ

Alexey Torgashin
to Russ
TEMPLATE_UTILS_HEADER RCDATA "./resources/utils.h"

My .rc file has this line, so it seems sometimes relative path is supported:

tatbutton BITMAP "res\\tatbutton.bmp"

Alexey

Alexey Torgashin
to Alexey Torgashin
> TEMPLATE_UTILS_HEADER RCDATA "./resources/utils.h"

I made an experiment with fresh fpcres compiled from source. It works even with your case! Ie with "./folder/filename". I created simple RC file, added there the line with "./folder/a.bmp", added BMP file in that folder, called fpcres using its full-path, all compiled OK. Alexey