Why can't i add my own header file to new projects?

first of all sry for posting so much. i just try to get started but there is a lot of confusion and i don’t even post nearly everything that confuses me. :smile:

i made a header file where i plan to store all my selfmade audio processing classes, so whenever i make new plugins i can just reuse them all the time to get faster and faster. the problem is… when i make a new project in the projucer and drag the header-file into the source folder there the header-files that were made by the projucer refuse to even see that there is another header file that could be included. i noticed that it’s still possible to just create a new header in the projucer and then copy over all the code, but that doesn’t seem like the way it’s supposed to work. what could be the problem here?

Can you not simply add ‘existing’ file in the Projucer file tree?

1 Like

hey. i just clicked on “reveal in explorer” on the file in the projucer and noticed that adding existing files does not copy them into the project’s source folder automatically, and that was essentially the reason why the other header files didn’t “see” my file. i wonder if this is a bug or implemented like this on purpose but my intuition says that when i import a file that i ofc want it to be part of the project files just like the juce libraries are always copied over. however thanks for pointing me to the file tree. that’s how i found out about my problem

The juce libraries are not copied over. There are some auto-generated stubs, that include the headers and cpp files.
If you click „add existing files“ they should appear in the include search paths, but that may vary across the different ide‘s.
If you write reusable code, my recommendation is to look at this file:

1 Like