What are linux headers and why do we need them
Asked Answered
S

3

7

I need to install CUDA key-rings, so before installing that i need to install Linux header files, so what is Linux header files and what is the purpose of the header files.

Sortie answered 17/6, 2023 at 6:49 Comment(0)
B
8

Linux headers are declarations of a programming interface needed to interface with Linux kernel.

In short, if you have a program that talks with the kernel, to build that program, you need those files.

The purpose is to provide the header files in one place, otherwise each program would need to have a copy of the header files, and that would be a mess when something in the header files gets changed.

Bonanza answered 17/6, 2023 at 10:44 Comment(2)
why do we need a copy of each program.Sortie
hello, edited. Copy of the interface, not the program.Bonanza
I
0

I always thought of it as a "manual of how to talk to linux", we need these files cause headers change with the kernel releases, without them every program would need to interface with every release and "know" all these files, which is impractical, with these files, the program at compile time just looks up in "the manual" how to interface with this release.

Insufficient answered 31/8 at 12:37 Comment(0)
I
-4

Basically the Linux equivalent of .net libraries.

Itinerate answered 13/11, 2023 at 22:55 Comment(3)
... which inevitably leads to the question: "What is a .net library?" Please read How to Answer and edit this post to make it clear to people wanting to use Linux headers but who aren't necessarily .net gurus.Erigeron
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.Odds
This answer solved mny doubtsNed

© 2022 - 2024 — McMap. All rights reserved.