I still had to adjust quite a bit to get it to compile on x86_64-linux:
- project was missing paths to ../library/support, ../library/ucum and ../library/snomed
- you need to make sure that units are used correctly for it to work correctly on case sensitive file systems: FPC first searches for the unit as-is, then lowercase and then uppercase. This applied to the following uses:
- uses of IdURI in unit FHIR.Web.Fetcher (implementation)
- uses of IdPOP3 in unit FHIR.Server.Subscriptions (interface)
- this also applies to the include of fhir.r5.inc where the file is named FHIR.R5.inc which will never match either, so either adjust the includes to FHIR.R5.inc or rename the include to fhir.r5.inc
With this out of the way we come to the linker errors (which
ld marks only as warnings, but which are hopefully the same that you see):
Warning: linker: /usr/bin/ld: cannot find -liodbc.dylib
Warning: linker: /usr/bin/ld: cannot find -lChakraCore
The
ChakraCore is due to me not having it installed (though you'll have to check whether the casing is correct), but the
iodbc one is the wrong library name (don't know
what it is, but
dylib is definitely wrong). You need to fix your constant in
FHIR.Database.ODBC.Headers, though FPC will ignore paths as it relies on the OS' search paths (some Linuxes don't have a
/usr/lib, but a
/usr/lib64 instead).
If you see these warnings as well then
that are your problems.
Some further remarks:
- the target directory is set to an absolute path, you should use a relative one here, too (C:/... will result in the creation of just such a relative path as : is a valid character for filenames)
- you should study the topic of Lazarus as packages to partition your code as that allows parallel compilation within the IDE (mainly important if you do a full rebuild), but also speeds full rebuilds in general as only the necessary packages will be recompiled (please note that a Lazarus package is not the same as a Delphi package)
- you should not version the .lps file as that contains session information, but not actual project information and will essentially always conflict if you opened/closed a unit