Hi plz help me in crating library files

This is a discussion on Hi plz help me in crating library files within the C Programming forums, part of the General Programming Boards category; Code: LIBS = ${LIBDIR}/libfcf041.a ${LIBDIR}/libfcf012.a i know how to create object files i.e cc -c program2.c can any one help ...

  1. #1
    Registered User
    Join Date
    Jan 2009
    Posts
    26

    Hi plz help me in crating library files

    Code:
    LIBS =  ${LIBDIR}/libfcf041.a
                ${LIBDIR}/libfcf012.a

    i know how to create object files i.e cc -c program2.c
    can any one help me in the command for creating library files.
    Thanks & Regards,
    vijay,

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    You would look at ar (assuming *nix).

  3. #3
    Registered User
    Join Date
    Jan 2009
    Posts
    26

    hi

    i want to create a make file so i need library functions.Is there any command like crating object files.
    i found this in make file.So i want to know how to create these libraries
    Code:
    ## List all the libraries needed to be linked in.
    LIBS =  ./libfcf021.a \
            ./libfcf041.a \
            ./libfco710.a \
            ./libfcf012.a
    Waiting for valuable replies.
    Thanks & Regards,
    vijay

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Yes, and to do that, assuming we are using Linux/Unix platform, is "ar" - that is, if you want to create them from object files - to get object files you need to compile the source files.

    A library is simply a file that contains multiple object files.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  5. #5
    Registered User
    Join Date
    Jan 2009
    Posts
    26

    Hi matsp

    ya i am using unix platform.Can u please send me the command for that
    this is the make file-->fcf012u0.mak
    c-file is fcf012u0.c
    and object file is program2.o it was created by cc -c fcf012u0.c
    to create a library file libfcf012.a
    can you help with the command for creating the object file.

  6. #6
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    So which part of "There is a command called 'ar' that creates an archive (aka library)" did you not understand?

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 7
    Last Post: 02-01-2009, 03:53 PM
  2. Proprietary software and gnu linux
    By code2d in forum A Brief History of Cprogramming.com
    Replies: 19
    Last Post: 06-27-2007, 09:44 AM
  3. VC++ 6 question: browsing into a library
    By maxhavoc in forum Tech Board
    Replies: 4
    Last Post: 09-15-2006, 06:57 AM
  4. Need help with audio library on DOS...
    By Marton79 in forum C Programming
    Replies: 10
    Last Post: 08-25-2006, 12:32 AM
  5. reinserting htm files into chm help files
    By verb in forum Windows Programming
    Replies: 0
    Last Post: 02-15-2002, 08:35 AM

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