This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How do you create a library ?

Hi,

I have created some functions and I need to create a library for a client. I don't want him to have my source. So how can I create such thing ?

Thanks,

Oprah,

Parents
  • "...a header so that the linker can find them..."

    Sorry for the confusion.

    I do not mean a header in the sense of a C language .h file.

    I mean a header in the sense of structured information available at the beginning of a file (or packet, or whatever) which describes the following information. A library file often has a really simple structure that looks something like:

    header:
    (obj file1, offset)
    (obj file2, offset)
    (obj file3, offset)

    body:
    file1
    file2
    file3

    This is an archive file that simply contains other files along with an index of where to find them, kind of like a .ZIP file without compression. You can add lots of extra features and refinements, of course.

    As far as I know, the Keil implementation includes all of the contents of an obj file if any item is referenced. The linker will omit totally unneeded .objs, which at least is a step up from handing uVision a list of .obj files, which will all be included in the project even if not needed.

Reply
  • "...a header so that the linker can find them..."

    Sorry for the confusion.

    I do not mean a header in the sense of a C language .h file.

    I mean a header in the sense of structured information available at the beginning of a file (or packet, or whatever) which describes the following information. A library file often has a really simple structure that looks something like:

    header:
    (obj file1, offset)
    (obj file2, offset)
    (obj file3, offset)

    body:
    file1
    file2
    file3

    This is an archive file that simply contains other files along with an index of where to find them, kind of like a .ZIP file without compression. You can add lots of extra features and refinements, of course.

    As far as I know, the Keil implementation includes all of the contents of an obj file if any item is referenced. The linker will omit totally unneeded .objs, which at least is a step up from handing uVision a list of .obj files, which will all be included in the project even if not needed.

Children
No data