compiling a library with a c code

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Karthik

    compiling a library with a c code

    Hi,
    I have a library libXpm.so.4.11 and a header file xpm.h. Now I have a
    c code which uses a function in this library. I am not sure how to
    compile my code with this library. I include the header file in the
    usual way in the C code. I have the library and the header file in the
    same directory as the c file. How should I compile this code in order
    to make the functions present in the library visible to the compiler.
    I am not all that familiar with make files. So if thats the only
    solution I could use some help with that. Lets say my c files name is
    some.c and it has all the header files included in it

    Since its just one library is there a way to compile it in cc. Any
    help in this matter please.

    Thanks
    Karthik
  • Mike Wahler

    #2
    Re: [OT, redir, welcome msg] compiling a library with a c code

    "Karthik" <kars175@yahoo. com> wrote in message
    news:8f5ee1eb.0 408261035.76fb5 cc3@posting.goo gle.com...[color=blue]
    > Hi,
    > I have a library libXpm.so.4.11 and a header file xpm.h. Now I have a
    > c code which uses a function in this library. I am not sure how to
    > compile my code with this library. I include the header file in the
    > usual way in the C code. I have the library and the header file in the
    > same directory as the c file. How should I compile this code in order
    > to make the functions present in the library visible to the compiler.
    > I am not all that familiar with make files. So if thats the only
    > solution I could use some help with that. Lets say my c files name is
    > some.c and it has all the header files included in it
    >
    > Since its just one library is there a way to compile it in cc. Any
    > help in this matter please.[/color]

    The C language (the only topic here) defines nothing about
    the physical mechanics of how a translator works. You'll need to consult
    your documentation and/or a newsgroup/mailing list which discusses your
    particular compiler. Each compiler will do things its own way.



    -Mike


    Comment

    Working...