Hi, any update to this issue? I’m having the exact same problem, with the exact same not great solution that the OP came up with in their edit. The problem arises even if I use Projucer’s “Add existing files…” option in the + button
2024 and I still can’t get this to work. Files that are dragged into the projucer, or added using “add existing files” from the + button appear in the projucer’s “File” tab are not seen by xcode as being part of the project. And when I “reveal in finder” they are not in the same folder as the original projucer files. I’m not sure how to create a submodule.
What did work for me was to choose “add new cpp file” or “add new header file” and then copy and paste my code into the new files. Not fun if you have to do multiple files.
And what’s really funny about this is that when I do the thing that doesn’t work, the files are perfectly aligned with the projucer created files like Main.cpp. When I do the thing that does work the files the files are indented less and don’t look like the are in the same folder as Main.cpp. Really weird
I thought I did add test.h to Source. I would think anyone looking at my screenshots would also think so, but apparently adding an existing file just adds a reference to the original location of the file, which is not what I want.
Is there a way to quickly add a few files, not references to files in other folders, to a juce project? Drag and drop doesn’t work, it does the same as “add existing file”. There doesn’t seem to be any way to do it besides creating new empty files one at a time and copying and pasting the code I want in to the new empty files. That’s kind of time consuming and annoying, but doable
Well, it looks like test.h was added to a folder called /test.
I think you might want to ensure that test.h is inside the folder “Source” by checking the native finder, rather than the Projucer.
The Projucer’s file explorer accounts for mappings, not folder specific hierarchies. This means that you can have Source/test in the Projucer while simultaneously seeing Source/Test/test in the Finder.
General rule of thumb, create files outside of Projucer, drag them in. If you’re using the ‘+’ button to add files, ensure you’re adding the file to the source directory in the File Chooser that pops up.
Actually test.h was added to the projucer project from a folder called test. My screenshot depciting the folder test shows where the file came from just before I “added” it to the project. The other screenshots show a file called test.h which appears to be in the same folder with the other source files, which it isn’t of course. Thanks for your help in understanding how the projucer adds files to projects