Is there any way to combine .o files together to form a single object file that can still be linked in?
The reason I'd like this is that the Mac interfaces are made up of about 350 units, and each of them produce a .o file containing the init code (even though there is no implementation section). As far as I'm aware, there is no way to make GPC not produce the implementation code or not call it. I thought that if I called it like:
gpc -I/Users/peter/unix/gpc/gpc-pinterfaces/GPCPInterfaces -funit-path=/Users/peter/unix/gpc/gpc-pinterfaces/GPCPInterfaces --automake -o testrecord testrecord.pas
it would automatically include all the necessary units, but apparently not (did this change, I think it worked before but I might have compiled it slightly differently).
I obviously can't add /Users/peter/unix/gpc/gpc-pinterfaces/GPCPInterfaces/*.o to the end because the command line would be way longer than allowed.
So the best I can think of is to combine all the .o files in /Users/peter/unix/gpc/gpc-pinterfaces/GPCPInterfaces/*.o into a macos.o object file that could be included.
Does anyone know how to do that or does anyone have any better idea?
One alternative is to change from unit "uses" to include files (which the Mac interfaces support anyway for reasons I've never understood), and just make a single really really big unit including all the interfaces. However that would be quite large and I don't know how happy GPC will be with a single unit with 300,000 lines in it, or how slow it will be for users to use it once the .gpi has been created.
I'll try some experiments, but if anyone has any suggestions, I'm all ears.
Thanks, Peter.