separate compilation

This is a discussion on separate compilation within the C Programming forums, part of the General Programming Boards category; Hi I have coded some functions related to linked lists, like: createList() deleteNode() searchList() seekNode() printNode() printList() They are saved ...

  1. #1
    Registered User PutoAmo's Avatar
    Join Date
    Mar 2002
    Posts
    72

    separate compilation

    Hi

    I have coded some functions related to linked lists, like:
    createList()
    deleteNode()
    searchList()
    seekNode()
    printNode()
    printList()

    They are saved in files named after the function:
    createList.c
    deleteNode.c
    searchNode.c
    ...

    I also have made a header file (linkedList.h) which includes the structure declarations used in the list, like:

    Code:
    typedef struct nodetag
    {
        DATA data;
        struct nodetag *link;
    } NODE;
    Now I would like to include all those functions in a library, so I can just call the functions when needed.

    How can I do that?

    Thanks in advance !
    Last edited by PutoAmo; 04-02-2002 at 05:03 AM.

  2. #2
    B26354 Deckard's Avatar
    Join Date
    Jan 2002
    Posts
    633
    What OS and compiler, PA?
    Jason Deckard

  3. #3
    Registered User PutoAmo's Avatar
    Join Date
    Mar 2002
    Posts
    72
    Linux, gcc

  4. #4
    B26354 Deckard's Avatar
    Join Date
    Jan 2002
    Posts
    633
    You can create a shared or static library in gcc with the -shared and -static command line options.
    Jason Deckard

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. all about cross compilation
    By munna_dude in forum Linux Programming
    Replies: 1
    Last Post: 08-27-2008, 04:15 AM
  2. separate integer into individual units
    By manzoor in forum C++ Programming
    Replies: 9
    Last Post: 05-12-2008, 10:03 AM
  3. MS VC++ Crash on compilation
    By Magos in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 08-23-2003, 07:06 PM
  4. inputting time in separate compilation
    By sameintheend01 in forum C++ Programming
    Replies: 6
    Last Post: 03-13-2003, 03:33 AM
  5. Problem with separate compilation
    By Clyde in forum C++ Programming
    Replies: 16
    Last Post: 05-18-2002, 09:43 AM

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