I have some c files..and each c file perfoms a specific function...So i want to make API's for each function....
In the end i should have few API's each performing different operation.......
So can anybody tell me the way or steps ..how to do this?
How to make an API in C?
It helps if you understand what an API is. http://en.wikipedia.org/wiki/API
An API is not a function. It is the interface that a source code can use to work with a library. If your c files form a coherent library, compile them as a library file and give out the headers to appropriate functions. Obviously, design your library appropriately, so that you can expose a meaningful interface.
Reply:Yes, csanon has it right.
I'd just add/emphasize that your API is usually just
the function prototypes that you specify in a header (.h)
file (and any user defined types, structs, enums, etc,
that are required for use in calling the functions).
nobile
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment