Hi, I was wondering if linux has a method to create your own personal header files like the stdio.h. Maybe somone might know a word to describe the keywords that gcc accepts in its programming. Like __time__. I'm not sure if __time__ is one of them but I remember running into something and I was hoping someone could point me in the right direction concerning this topic.
Yes. Make the file. The file is plain text with C++ code in it. Save that file somewhere that your compiler will find it. This means in the same place as your cpp files, or somewhere in the compiler's search path. Let's say that you've done that and named your file myHeaderFile.
Here is how you would include it: #include <myHeaderFile>
If you had named it myHeaderFile.h, this is how you would include it: #include <myHeaderFile.h>
I think you misunderstand header files. They're not anything special. They're just plain C++ code. That's all.
Man how can you not know what I'm talking about? have you ever used just C before if you include a header file with greater then or less then signs then it's a library header file.
I was asking if someone could point me in the right direction to making a gcc built in header file.
Ok I feel kind of dumb now because I found out you can make dlls with c programming but that still leaves stuff not possible for me. Is there a better way to make dlls and header files for the dlls?
I don't think there is any difference between a "normal" header file and a library header file. The only difference I can think of is that standard headers and library headers are often put in special directories. #include <myHeaderFile.h> normally only search the directories where it finds the the standard headers and the library headers while #include "myHeaderFile.h" search additional directories.
Oh i thought you might be able to use asm for it or something. I was hoping there was some online documentation.
I thought c programming had limitations compared to asm and I wanted to make functions for my programming that isn't possible unless someone else makes something that probably wont be compatible with my computer.
have you ever used just C before if you include a header file with greater then or less then signs then it's a library header file.
In C++ (and I suspect C) the difference between including using "xxx" and <xxx> is implementation dependent, and only affects the order in which directories are searched for the named header file.
What do you think the difference is between a library header file and one you make yourself? One of them came with the compiler, the other didn't. That's it. That's the whole difference. There is nothing magical about the header files that came with the compiler. It's a plain text file that gets pasted into your cpp file when you include it. The compiler can't tell the difference between one that came with the compiler and one you wrote yourself, because there is no difference.
I want to make functions that c programming doesn't provide.
Playing sounds depends on your operating system and hardware. Your operating system will present an API (set of functions you can call) to do such things. It is generally easier to use an intermediate library that will handle all the low-level API handling for you and give you a simple interface.
I note that this is in the Unix/Linux forum. Unix/linux does not use dll files. The equivalent are so files.