Thread: Linking libraries

  1. #1
    Registered User
    Join Date
    Oct 2014
    Posts
    3

    Linking libraries

    I have compiled a certain library, however it didn't generate a lib<libname>.a file. It generated <libname>.a file. Is there a way to tell the compiler that the lib is not using lib prefix?

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    Is it too hard to rename it, or fix the build process?

    Or perhaps create a symbolic link to it?
    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.

  3. #3
    Registered User
    Join Date
    Oct 2008
    Location
    TX
    Posts
    2,059
    Are you using a makefile or just plain command line compilation?
    Either way it'd the same switch "-o <libxyz.a>" for naming the generated output file.

  4. #4
    Registered User
    Join Date
    Oct 2014
    Posts
    3
    I think I have already solved it. Instead of -l<libname> I just did objs/<libname>.a and it seemed to work.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. linking to libraries
    By davbeck in forum C Programming
    Replies: 3
    Last Post: 09-27-2008, 04:56 PM
  2. Help with linking to other c++ libraries via .net
    By pipercubusa in forum C++ Programming
    Replies: 0
    Last Post: 05-02-2005, 01:08 PM
  3. Linking and Libraries
    By krygen in forum C++ Programming
    Replies: 14
    Last Post: 12-26-2004, 03:01 PM
  4. Dynamically linking libraries
    By neandrake in forum Windows Programming
    Replies: 5
    Last Post: 06-18-2003, 02:54 PM
  5. Linking .h files to libraries
    By sean in forum C++ Programming
    Replies: 2
    Last Post: 10-27-2001, 08:20 PM

Tags for this Thread