I waste many times with Fibonacci, and came to the conclusion, that is it not a good idea to code from scratch.
Because I stuck into Problems with wrong Function Import Headers, which results into a crash of the Application - the good know 0x7b thing.
So, I see, that it is better to start with ground base.
But I can see, that some Start-Parameters for fpc does not take in effect.
So, when I use -CD, I have a smaller DLL as without this Parameter, but the DEF file will not generate.
My way is then, to write the EXPORT DEF File and the Functions per Hand and create a import .A file with dlltool.exe.
The current thing what I do is, to export the CLASS Create CTORS and DTORS with global functions, and procedures.
Functions for CTORs, and procedures for DTORs.
Then in a second step, I import these Functions/Procedures into a seperate Import Class.
This results then into smaller files.
I have not a Roadmap or anything of this, so all is alpha testing ...