I have to admit that I’m feeling a bit dumb asking this because it seems to be a very basic question - but I learned almost all my programming skills just by “learning by doing” and searching the internet.
So, I’m currently working on my first “big” piece of audio software, based on JUCE, but also depending on other libraries. I manage all third party code - if possible - as a git submodule in my project and successfully included a big header-only library by adding the folder containing its submodule in the “Header Search Path” of every Exporter in the Projucer. I also managed to include another library which came as a static library with a header file, by specifying another Header Search Path for the header file and added the library name under “External libraries to link” in the Exporter.
Now I found this and I need it for my Project
https://sourceforge.net/p/jucefiltergraph/code/ci/master/tree/
I added it as a submodule to my project, set a new Header Search path to that folder and tried including a new FilterGraph to my project and all I get is a linker error, as the linker doesn’t find the functions described in the source files. This seems quite logical to me, I believe they didn’t get compiled at all as neither the compiler knows about their existence nor does the linker know where to look after the compiled versions of these .cpp files as the linker also doesn’t know about their existence (am I right?). Now although I have a rough idea of what’s the problem here, I have absolutely no clue how to get this done right, as there is no such thing as a “Sourcefile Search path” to specify. The only solution I found as a workaround was adding the two .cpp files as existing files in the projucer’s file explorer, now it compiles and links fine.
But I think this is not the way it should be done, right? So please could you tell me
a) how the compiler & linker finds source files located in a directory beneath the project-directory
b) what is good practice to get this working and setup a project with more complex dependencies on third party libraries (also for bigger libraries, containing more than just two .cpp files)
By the way: Thank you for all help I already got here!