compiling a library with a c code

K

Karthik

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
 
M

Mike Wahler

Karthik said:
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.

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.

http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html

-Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top