linking application with a library
vipin aravind
vipin.aravind@wipro.com
Sun Nov 11 08:26:00 GMT 2001
I think you are static linking thats why. its a choice if you want
to dynamically link the library in which case it would have stubs which
does the getprocaddress internally at runtime while the actual code
resides in the dll and hence your executeable code would become small in
size.
vipin
> Hi all,
>
> I am using h8300-hitachi-hms-gcc cross-complier for building my
application.
> I have a lib mylib.a (20 kb) which I want to link with my application.
> My application gets 20 kb bigger as soon as I link it with mylib.a
> without any function being called from mylib.a.
> It seems to me that I have built mylib.a so that the whole lib is linked
> during linking process even if no one method is being called.
> Now my question is which flag should I use to build mylib.a so that only
> those functions are linked which are being called.
> If no function is called then linking mylib.a shouldn't affect the size
> of my application.
>
> Thanks for help.
>
> regards
> /Mohammad
>
>
> --
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting: http://cygwin.com/bugs.html
> Documentation: http://cygwin.com/docs.html
> FAQ: http://cygwin.com/faq/
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: InterScan_Disclaimer.txt
URL: <http://cygwin.com/pipermail/cygwin/attachments/20011111/0fee265c/attachment.txt>
-------------- next part --------------
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list