Anyone have a good link to a site on how to make a library?

This is a discussion on Anyone have a good link to a site on how to make a library? within the C Programming forums, part of the General Programming Boards category; I have a simple file.h and file.c and looking to make a library out of it so I can do ...

  1. #1
    Registered User
    Join Date
    Oct 2009
    Posts
    7

    Anyone have a good link to a site on how to make a library?

    I have a simple file.h and file.c and looking to make a library out of it so I can do :

    #include <file.h>

    anyone know a good tutorial for this?

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    Given that it's not possible, I doubt you'll find many links at all.

    You generally need a header (.h) file to use a library, but they are separate things and shouldn't be conflated.

    To create a library from file.c, all you need to do is compile it.

  3. #3
    Registered User
    Join Date
    Oct 2009
    Posts
    7
    No you can do it.
    I did one at a school account a little bit ago but forgot how to do it.

  4. #4
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    Of course you can do it. But using a library and including a header file are as related as fish and bicycles.

    And if you don't even want to go to the trouble of creating the library, you can just include the file.c on the command line when you compile your main program.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Recommend a good exception library?
    By ITAmember in forum C Programming
    Replies: 9
    Last Post: 06-26-2009, 01:34 PM
  2. .lib vs .h vs .dll
    By Shadow12345 in forum C++ Programming
    Replies: 13
    Last Post: 01-01-2003, 05:29 AM
  3. What is a DLL (Dynamic Link Library)
    By Perica in forum C++ Programming
    Replies: 8
    Last Post: 11-02-2002, 01:31 PM
  4. Ok, my teacher wants me to make a site........
    By incognito in forum A Brief History of Cprogramming.com
    Replies: 24
    Last Post: 03-03-2002, 10:31 PM
  5. Whats a very simple but good game i can try to make?
    By bluehead in forum C++ Programming
    Replies: 2
    Last Post: 11-06-2001, 09:24 PM

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