Static Library: Create the Client
Learn how to link the client to a static library.
Follow the steps given below to create a client that can use the static library created earlier.
Create the client
In the client
, we are using the factorial( )
function present in the static library. The prototype of this function is available in lib_static.h
, present in a different project.
We have provided the source code for the static library and client program. When you press the RUN button, it will automatically compile the static library and open the terminal for you. Execute the following commands in the given terminal to make the static library functions available to the Client:
gcc -c client.c -o client.o
gcc client.c -L. -lstatic -o client
./client
Get hands-on with 1200+ tech skills courses.