I was of the opinion that if we put functions in library and then link them into program only that functions gets linked into the executable.
But what we found is that all the function are getting linked into the executable even if one function from the library is used.[ When we build a lib with only one function and then use it in the program the exe size is very small, but if we link it with a library having more functions and we are using only one from it the exe size is very large].
Is there any wrong we are making in compiling library or executable.??
But what we found is that all the function are getting linked into the executable even if one function from the library is used.[ When we build a lib with only one function and then use it in the program the exe size is very small, but if we link it with a library having more functions and we are using only one from it the exe size is very large].
Is there any wrong we are making in compiling library or executable.??