Skip to content

Conversation

@sourajeetmohanty
Copy link

No description provided.

1 . **Static**
2. **Shared or Dynamic**

**Static** : Static libraries contains object code linked with an end user application and then they become the part of the executable. These libraries are specifically used at compile time which means the library should be present in correct location when user wants to compile his/her C or C++ program. In windows they end with .lib extension and with .a for MacOS.
Copy link

@krishnacx krishnacx Oct 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can involve the user by rephrasing with when you want to compile C or C++ program.

In windows, they end with .lib extension while in UNIX/MacOS, they end with .a.


**header files , files , libraries**

**Header Files** : The files that tell the compiler how to call some functionality (without knowing how the functionality actually works) are called header files. They contain the function prototypes. They also contain Data types and constants used with the libraries. We use #include to use these header files in programs. These files end with .h extension.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Data types -> data types


**Static** : Static libraries contains object code linked with an end user application and then they become the part of the executable. These libraries are specifically used at compile time which means the library should be present in correct location when user wants to compile his/her C or C++ program. In windows they end with .lib extension and with .a for MacOS.

**Shared or Dynamic** : These libraries are only required at run-time i.e, user can compile his/her code without using these libraries. In short these libraries are linked against at compile time to resolve undefined references and then its distributed to the application so that application can load it at run time. For example, when we open our game folders we can find many .dll(dynamic link libraries) files. As these libraries can be shared by multiple programs, they are also called as shared libraries.These files end with .dll or .lib extensions. In windows they end with .dll extension.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some punctuation remarks.

These libraries are required during run-time. In short, these libraries....

Space before These files end with .dll, or.lib or .so extensions.

In windows, they end with .dll extensions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants