xdpw icon indicating copy to clipboard operation
xdpw copied to clipboard

Implement DLL building

Open vtereshkov opened this issue 5 years ago • 1 comments

Currently XD Pascal can produce EXEs, but not DLLs. To support DLL building, we need to:

  • Fill the .edata and .reloc (?) sections in the PE
  • Introduce the library and exports keywords. There is no reliable information on the exports syntax

vtereshkov avatar Mar 20 '20 13:03 vtereshkov

Well, Free Pascal, if I'm not mistaken, can make DLLs, and either the compiler does it internally or they have an external linker that makes them, and if so then that's where to look. Three possible options: 1. change XDPW to optionally generate DLLs. 2. Generate an assembly language file that can be passed to an assembler that can make an object file that can be given to the linker, or 3. Creating an object file so the linker can create a DLL. Since Free Pascal does it, either it includes a linker in the compiler or it borrows one that is also redistributable. For people who just want to code a reasonable program and run it, what this program does is probably good enough, but for those with special needs it might require updating. Vasiliy has stated he no longer maintains the program. If he's willing to transfer it to me, or to someone else willing to do so, we can see about getting it resolved. If nothing else, Microsoft gives away Visual C++ which I'm sure includes a linker and thus I'm sure there is a way to do this.

electric-socket avatar Oct 27 '20 20:10 electric-socket