I'm making a little mess while creating custom libraries.
I'm using Visual Studio 2019.
I have some libraries that I'm going to use in lots of projects, so I created an external folder called lib in which I put header files (declarations) and .cpp files (definitions).
In .cpp files I included every relative header using #include "name.h" and the same into every main.cpp in which I should use them.
But the problem is: how does the complier find .cpp libraries if I never call them?
So I discovered that I can right click on every single solution and >Add>Existing Project>H:\C++\lib\name.cpp
But this is a bit frustrating to do in every project for every library that I want to include, since I already #include headers so I can't see why should I include libraries too.
So the question is: is there a way to set another default folder in which Visual Studio could go to search for definitions like Standard Libraries or should I copy-past each .cpp into my solution to include it automatically?
I don't understand why I can't find any solution onlinebacause it should be a very common problem!