Static and dynamic libraries

  • How do they work:
  • How to create them:
gcc -c lib_mylib.c -o lib_mylib.o
ar rcs lib_mylib.a lib_mylib.o
  • How to use them
gcc -c driver.c -o driver.o
gcc -o driver driver.o -L. -l_mylib
./driver 
fun() called from a static library
  • What are the differences between static and dynamic libraries

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Automating container security on GKE with Binary Authorization and CircleCI

Of Computer Memory | Part 1

The Future is API-First

Dynamically updating parts of a cached page with WPSC

Case Study of AWS SQS.

Machine Learning Applications, Office Returns, & More…

Different Approach to Create Mapper using Kotlin Delegated Properties

Architecture to deploy Liferay DXP on AWS

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Paola Andrea Garcia Altamirano

Paola Andrea Garcia Altamirano

More from Medium

As-a-Service Periodic Table

Setting up SSL for multiple git accounts

WM Questionnaire Part-1 WH Structure

Docker Private Registry Using Ansible