On Thu, Mar 08, 2001 at 05:21:57PM -0800, Ward Willats wrote:
> Is it possible to link to some libraries statically and others shared in
> the same executable? In the little bit of poking around we've done
> here, static always seems to win...

Use the -Wl flag to switch between static and dynamic libraries. Here's
an example that links the GTK+ libraries statically, and all other
libraries dynamically:

  gcc -o foo foo.o \
    -L/path/to/gtk/lib -Wl,-Bstatic -lgtk -lgdk -lglib \
    -Wl,-Bdynamic -lXext -lX11 -lm


Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2783635  Fax: +31-15-2781843  Email: [EMAIL PROTECTED]
WWW: http://www-ict.its.tudelft.nl/~erik/

_______________________________________________
http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
Please visit the above address for information on this list.

Reply via email to