Removing link libraries in static libs

This is a discussion on Removing link libraries in static libs within the C Programming forums, part of the General Programming Boards category; A static library im making requires the "libwsock32.a" lib. Is there a way to make it so people who use ...

  1. #1
    Registered User
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    217

    Removing link libraries in static libs

    A static library im making requires the "libwsock32.a" lib. Is there a way to make it so people who use my lib do not have to manually link to "libwsock32.a"? As in, is there a way for my static lib to automatically link this so they dont have to?

    EDIT: useing mingw

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,540
    You can extract all the .o files from the .a, and repack them all, along with yours in another .a
    But you might be breaking some copyright / redistribution laws by doing so.

    Is it really a hardship just to tell people in a readme, that "you also need libwsock32.a"
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Seg Fault in Compare Function
    By tytelizgal in forum C Programming
    Replies: 1
    Last Post: 10-25-2008, 03:06 PM
  2. seg fault at vectornew
    By tytelizgal in forum C Programming
    Replies: 2
    Last Post: 10-25-2008, 01:22 PM
  3. Problem with a file parser.
    By Hulag in forum C++ Programming
    Replies: 7
    Last Post: 03-17-2005, 08:54 AM
  4. Making static libraries
    By fh791 in forum C++ Programming
    Replies: 1
    Last Post: 09-07-2004, 02:48 AM
  5. .lib vs .h vs .dll
    By Shadow12345 in forum C++ Programming
    Replies: 13
    Last Post: 01-01-2003, 04:29 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21