Skip to content

update c_cpp.md#29

Open
sourajeetmohanty wants to merge 1 commit intofeddischson:masterfrom
sourajeetmohanty:master
Open

update c_cpp.md#29
sourajeetmohanty wants to merge 1 commit intofeddischson:masterfrom
sourajeetmohanty:master

Conversation

@sourajeetmohanty
Copy link
Copy Markdown

No description provided.

Comment thread doc/lang/c_cpp.md
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
Copy Markdown

@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.

Comment thread doc/lang/c_cpp.md

**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.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Data types -> data types

Comment thread doc/lang/c_cpp.md

**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.
Copy link
Copy Markdown

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