I have recently updated my Linux desktop to Kubuntu 16.04. In the main this has been a painless and positive experience. One small problem was caused by the loss of my old hand-built Linux resource compiler. This is used by Lazarus to generate Windows style resources that I need for embedding data files in cross-platform applications.
As I can’t now remember how I built the utility on 15.04, I started researching the simplest way to get a working resource compiler for 16.04. Fortunately, it turns out that there is a cross-compiling package available in the Ubuntu Universal repository that contains a binary clone of windres. This package can be installed by:
sudo apt-get install mingw-w64
In this package the required program is named x86_64-w64-mingw32-windres. Lazarus looks for an executable simply called windres. So to enable Lazarus to find this, I created a symlink to the file with the following command:
sudo ln -s /usr/bin/x86_64-w64-mingw32-windres /usr/bin/windres
Now Windows ‘rc’ files can be automatically processed by Lazarus during build commands just as they would be when working on a Windows host.