Thread: Removing link libraries in static libs

  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 int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    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.

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, 09: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, 05:29 AM