Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update c_cpp.md #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

None yet

2 participants