Working with Linux Libraries in Delphi Craig Chapman
Working with Linux Libraries in Delphi Craig Chapman, Embarcadero, Software Consultant craig. chapman@embarcadero. com twitter: @Craig. Chapm 53280
About Me • Craig Chapman: • • • Email: craig@chapmanworld. com Twitter: @Craig. Chapm 53280 Blog: http: //chapmanworld. com • Consultant for Embarcadero Technologies. • Delphi Developer >20 years • “Mad Scientist” – Electronics and Software
Agenda • • What are shared object files? Early vs Late binding to shared object files (. so) Create and consume a shared object library Finding headers and documentation Header translation (basics) The X-Server Creating an X-Server application
Shared Object Files • • • Comparable to. DLL (Dynamic Link Libraries) from Windows systems. . so File extension Elf format files with a number of ‘Exports’ Typically the ‘cdecl’ calling convention. Provide the ‘API’ for Linux Common (minor differences) across multiple *nix platforms.
Early vs Late binding • • Not to be confused with static binding. Early binding requires interaction from the linker. Late binding involves calling the API for function pointers. • Function pointer types must be defined. Early binding issue in Delphi? • Header File import.
Shared Object Files • Lets create and consume our own shared object file.
Q&A More Information: http: //chapmanworld. com/working-with-linux-libraries-in-delphi
- Slides: 7