|
-
Dec 24th, 2001, 07:35 AM
#16
Monday Morning Lunatic
CRT = C RunTime library
If you link it into your program, that's static. If it uses msvcrt.dll then that's dynamic (and considering msvcrt.dll HAS to be on every system, that's not really a problem).
Like I say, it's a problem with the layout of the libraries, or perhaps the linker. 27KB was when it brought all the file i/o stuff in which is a size killer for both C and C++.
Although, I got a printf equivalent by using wsprintf, GetStdHandle, and WriteFile. It works perfectly, and takes almost no space in the executable.
I think I get round most of these problems by just hacking out the bits of the CRT source I want and using the rest from kernel32.dll.
I will admit though, that a pure C compiler can get it down further, because the library doesn't need to support calling all the static initialisers.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|