Thread: [HowTo] Distribute my C libraries?

  1. #1
    Registered User
    Join Date
    Jun 2006
    Posts
    22

    [HowTo] Distribute my C libraries?

    Hello, I wrote some c and h files with few structs and functions.
    Is there a way to "export" them like libraries, in order to distribute them instead of distributing the code? I dont know well the form of C projects, so I dont know what is usually done.
    Thanks a lot!

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Who is your audience? What platform(s)? Do you want static or dynamic libraries? Would it not be easier and more portable to just use a .zip file with the sourcefiles?

    What license agreement are you distributing under?

    --
    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.

  3. #3
    Devil™
    Join Date
    Oct 2007
    Location
    IIT-Kharagpur, India
    Posts
    104
    Quote Originally Posted by gibbofresco View Post
    Hello, I wrote some c and h files with few structs and functions.
    Is there a way to "export" them like libraries, in order to distribute them instead of distributing the code? I dont know well the form of C projects, so I dont know what is usually done.
    Thanks a lot!
    for linux this thread might help you
    x.h file definition in y.c file. how to link?
    C's Motto: who cares what it means? I just compile it!!

  4. #4
    Registered User
    Join Date
    Jun 2006
    Posts
    22
    Thank you for reply. I did not consider those aspects.
    gisosmat, thanks for link, I'm working under Win.
    matsp, you're probably right: a pack of code is better in this case.
    It's code for exercise and practice about data structures, so viewing the code itself should be interesting. So I'll make the zip.

    But! What shall I do if I'd desire to make dynamic libraries for Win?
    Thanks a lot again

  5. #5
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Are you trying to do a stand-alone .dll file that includes your code so you can link against that library and use that code in your app?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. GCC: Compiling with both static and shared libraries
    By eatwithaspork in forum C Programming
    Replies: 4
    Last Post: 06-23-2008, 01:48 PM
  2. Replies: 7
    Last Post: 05-13-2008, 03:47 AM
  3. MinGW thread-safe runtime libraries
    By Mario F. in forum C++ Programming
    Replies: 3
    Last Post: 08-21-2006, 08:15 AM
  4. Libraries and headers
    By darksaidin in forum C++ Programming
    Replies: 10
    Last Post: 07-23-2003, 06:24 AM
  5. QT and external libraries
    By Quacker in forum Linux Programming
    Replies: 1
    Last Post: 04-08-2003, 07:02 AM