wp-xyz / corona

Plots and analyzes daily data of the Covid-19 pandemic
MIT License
20 stars 10 forks source link

Not compiling under 2.0.10 and *.rc issue under *nix #30

Closed gcarreno closed 3 years ago

gcarreno commented 3 years ago

Hey Werner(@wp-xyz),

Compile error under 2.0.10

As of

367ecd6 (HEAD -> mapping, origin/mapping) Plotting of world map. No connection to Covid data, yet.

Lazarus stable is complaining:

$ lazbuild source/corona.lpi
# ...
/home/gcarreno/Programming/corona/source/cpolygonseries.pas(188,43) Error: (3026) Wrong number of parameters specified for call to "GetLegendItemsRect"
/home/gcarreno/FreePascal_stable/lazarus/components/tachart/lib/x86_64-linux/gtk2/tacustomseries.ppu:tacustomseries.pas(1464,29) Error: (5088) Found declaration: GetLegendItemsRect(TChartLegendItems;TBrush);
cpolygonseries.pas(245) Fatal: (10026) There were 2 errors compiling module, stopping
# ...

The new corona_resources.rc

Lazarus uses windres to compile the *.rc files. I found i686-w64-mingw32-windres on Ubuntu package binutils-mingw-w64-i686. I installed it and then had to do a ln -s i686-w64-mingw32-windres windres for lazbuild trunk to compile with success.

I think we should consider .lrs. It's the same thing and, to be honest, no external dependencies in terms of resource compiler because Lazarus has all the tools to manipulate *.lrs.

Just my 2¢s

EDIT: have a look at Lazarus resources

Cheers, Gus

gcarreno commented 3 years ago

After reading Lazarus Resources: Checking you have windres I now know that I don't need to

$ sudo ln -s i686-w64-mingw32-windres windres

I only have to install the package I mentioned and then mess with fpc.cfg, YAY!!

gcarreno commented 3 years ago

Closed by 7537c42 and c751c9e