Understanding Header Files in C
HTML-код
- Опубликовано: 11 сен 2024
- We all use header files in C, but what are they? They are files that hold the declaration of functions and constants that we can use in our main code. The declared functions still need to be defined compiled. In C the headers file has just the declaration and it is the source file that has the definition. If it is not in source then the definition must be in a library file that is already compiled and accessible on your system. For example the stdio.h will link to the glib.c module. Using both an IDE and the command line we explain how the linking works
Additionally you can find my video courses on Pluralsight: pluralsight.com... and take time to see my own site www.theurbanpen...
~-~~-~~~-~~-~
Please watch: "RHCSA 9 Working With Podman Containers"
• How To Use Podman Cont...
~-~~-~~~-~~-~
Thank you very much! This is the best explanation i watched on the subject.
Thanks Old man!
Thanks for this. Rest on Lori.
thanks! that was a good scrub! i'm learning C/C++ but this kind of thing is usually push aside...
Glad you liked it!
Good description, thank you
Your IDE fonts are too small, I can't see what you are doing on my Android phone 7inch screen
Is this leading up to a video about the linker?
Let me know what you are looking for. Here is the linker option in gcc to use dynamic modules, .so files www.theurbanpenguin.com/understanding-shared-libraries-in-linux/
a ton of useless explanation, you didnt show us how to creat a header file
Sorry. Didn’t know you needed a lesson in using a text editor
just create a new file called whatever.h and edit it
Hi! great explanation, but up until 8:00 and tried to compile my main.c , I got an error of 'lang: error: linker command failed with exit code 1 (use -v to see invocation)' . why is this happening? Seems like there is no connection betweeh myheader.h and hello.c
@_Oliver__ I have the same too, what's the update?
Are you storing the header file in a different directory from the main source file if so you're going to need to use ./include or whatever your header is at. this will allow your search path to go back up a directory".." this will allow boing back multiple directories "../.." there could also be an issue with the projects included headers locations if you want help personally with it let us know