Hi friends,
Here is an example of creating DLLs with smaller size. No C startup code.
[attachment deleted by admin]
Vortex,
This is really neat work.
Can you post what is going on, ie: how are you making the DLL's small and what size are
they without using your approach ?
Rgs, James.
Basically, he's not including the C library (AFAICT) and is providing his own entry point, much like how we do DLLs in assembly.
The PPJ files have all the build options in them, just open them in notepad/QEditor.
Cheers,
Zooba :U
Hi James,
Zooba's explanation is correct, the trick is to exclude the standart C run-time library supplied with the compiler package and define your own entry point. Back home, I will give you information about file size comparaison.
Vortex,
Thanks.
Im wondering what size difference it makes so when you know the normal size of
a DLL that would be great.
Rgs, James.
According to the test results with Pelles C V4.50 Beta 3 :
normal size = 8704 bytes
without C startup code = 3072 bytes
[attachment deleted by admin]
Thats great.
Do you know how to do this or do I need to do it for a Linux sharable object ?
Hi James,
Sorry, I am not a Linux user so I don't know if this trick works for Linux.
Vortex,
Given the simplicity of the approach im thinking it might work.
I'll ask around the other forums and if I find out Ill post here.
Rgs, James.
Once you use a function from the C library chances are you're going to include most of that bloat back in anyway. I prefer to pick a single (general-purpose) library and use it completely, rather than picking and choosing from multiple ones (unless they're single-purpose, ie. compressing, image loaders, etc.)