Add existing file to JUCE project

From windows, I create a GUI (say) project A in one Projucer window and a blank project B in another. Both targeting VS2015.

A contains 2 files in its /sources/ whereas the B contains none.

Let's say I want to copy these 2 files across.

I can find A/sources/ in Explorer and drag drop onto Projucer's File tab.

Alternatively I can copy them from A/sources/ to B/sources/ then right click on sources in Projucer's File tab and add them.

However whichever I do, if I 'launch in IDE', they don't show up. And consequently build fails as it cannot find main.

Is this some bug?

π

EDIT: I kind of solved this by creating new files using ProJucer and copying the contents of the original files into them. Ultra-lame!

Just checking as it wasn't clear: you need to hit "Save Project and Open in IDE..." are you doing that?

Yep, if the files appear in the Projucer's "File" tab, then this should definitely work after you save the Project.

Let me know if there's still a problem.

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

Create a git submodule in project B and refer to them in the projucer. That’s what I’m doing and works without an itch.