Follow these steps:
1) Code out a normal function in a C file, without any 'main' in it.
2) Make a library out of it
3) Code out a C file with 'main' function making a call to this function
4) Compile the C file with 'main' function using the library
The function that you wrote in the first C file is called an API coz with several other files contating their 'main' function you can use it, but with the help of a library consisting this function.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment