[geeks] quick static linking question

Greg A. Woods geeks at sunhelp.org
Thu Oct 11 15:33:30 CDT 2001


[ On Thursday, October 11, 2001 at 14:36:05 (-0400), Joshua D Boyd wrote: ]
> Subject: [geeks] quick static linking question
>
> I want to write a quick little program that uses a library (GTK
> specifically) to be distributed in binary form.  OK, the program is mostly
> written.  But I'm having trouble determining for sure how to make sure
> that it is statically linked.  Assuming that I have both .so and .a
> versions in the lib directories, is adding the -static flag really all I
> need?  Is there any way to easily verify that the program was statically
> linked short of uninstalling the relevent libraries or finding a machine
> without them?

run "file progname" and "ldd progname" and see what it says.

-- 
							Greg A. Woods

+1 416 218-0098      VE3TCP      <gwoods at acm.org>     <woods at robohack.ca>
Planix, Inc. <woods at planix.com>;   Secrets of the Weird <woods at weird.com>



More information about the geeks mailing list