I have a unit that I use in a Delphi XE project as well as a Delphi 11 (Alexandria) project.
One of the procedures is a handler for reading data for TIdUDPServer and the definition is different for XE vs 11.The only difference is the const keyword in the later version. I got around that by doing this:
If you use any 3rd party libraries, they probably have ready made defines for this already. Eg, for NexusDB you’ll find a nxDefine.inc file with such defines.