To convert app into static library - Linux

This is a discussion on To convert app into static library - Linux ; Hi, How do you convert an open source application into a static library such that its functions may be used as API (for other application development)? So far, I have downloaded the application and successfully performed configure, automake and make. ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: To convert app into static library

  1. To convert app into static library

    Hi,

    How do you convert an open source application into a static library such
    that its functions may be used as API (for other application development)?

    So far, I have downloaded the application and successfully performed
    configure, automake and make. However, what should the next step be?

    For now, the Makefile.am, Makefile.in, Makefile, source code and *.o
    files are all ready but I am stuck here..

    From googling, 'ar rcs' step may be used but I am not so sure of the
    dependencies between the object files...

    Best rgds,
    Paul

  2. Re: To convert app into static library

    Paul writes:

    > How do you convert an open source application into a static library such
    > that its functions may be used as API (for other application development)?
    >
    > So far, I have downloaded the application and successfully performed
    > configure, automake and make. However, what should the next step be?
    >
    > For now, the Makefile.am, Makefile.in, Makefile, source code and *.o
    > files are all ready but I am stuck here..
    >
    > From googling, 'ar rcs' step may be used but I am not so sure of the
    > dependencies between the object files...


    Your next step is to read the code and find out how to remove the
    functions you want to use from the main program. There is no
    'cookbook' approach, since it depends on how the program was written.

    If the program itself is written as a main that's really just the
    main program, and a bunch of other files with the functions, running
    ar might do it. If it's written any other way...

  3. Re: To convert app into static library

    On Sat, 01 Dec 2007 15:33:11 -0700, Joe Pfeiffer wrote:

    > Paul writes:
    >
    >> How do you convert an open source application into a static library
    >> such that its functions may be used as API (for other application
    >> development)?
    >>
    >> So far, I have downloaded the application and successfully performed
    >> configure, automake and make. However, what should the next step be?
    >>
    >> For now, the Makefile.am, Makefile.in, Makefile, source code and *.o
    >> files are all ready but I am stuck here..
    >>
    >> From googling, 'ar rcs' step may be used but I am not so sure of the
    >> dependencies between the object files...

    >
    > Your next step is to read the code and find out how to remove the
    > functions you want to use from the main program. There is no 'cookbook'
    > approach, since it depends on how the program was written.
    >
    > If the program itself is written as a main that's really just the main
    > program, and a bunch of other files with the functions, running ar might
    > do it. If it's written any other way...


    got it! tried and making progress!! thanks

+ Reply to Thread