Skip to main content
GameDev.net gamedev.net
🔒 Locked

library file optimizations

Started by Jenison Mar 8, 2004 at 9:52 PM 0 replies 250+ views
Original Post
Jenison
Jenison
seems like I should know this answer but I want to make sure ... when I connect a program to alibrary and compile it, it only grabs the code that I use correct? So the library could be huge but if I only use a portion of that it will only carry that over into my exe? edit - not a dll but a static library file [edited by - Jenison on March 8, 2004 10:53:42 PM]
Oluseyi
Oluseyi
quote:
Original post by Jenison
when I connect a program to alibrary and compile it, it only grabs the code that I use correct?
Yes. When you link against a static library, the object code you use is extracted and compiled into your own binary.

quote:
So the library could be huge but if I only use a portion of that it will only carry that over into my exe?
That''s the idea. Of course, a really bad linker could just plop the entire thing into your binary...

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.