I've had this problem for a while and finally decided to just ask it. I have a folder-worth of .cpp files I would like to include into multiple projects. I have put all the .h and .cpp files into one directory C:/MyCode/
and have added the directory to "Additional Include Directories" in Visual Studio. For the .cpp files, I know I could add all of them manually, one at a time, but I would like to use this code for multiple projects and would prefer not to spend 10 minutes including each one for every project I make (I make a lot of projects.) I read here that I could use something called a wildcard to include multiple files of the same type by accessing the project file directly with notepad or something, but it doesn't seem to work in my case as it still doesn't recognize the functions I have defined. I have also tried making a library with all the function definitions in it and including it that way, but it did not work. I prefer against this method anyway as I would like to be able to edit the code in the original directory (C:/MyCode/
) and have it affect the code for all the projects that use it.
So my question is, is there a way to make Visual Studio include all the .cpp files in a folder? All that I have found does not seem to work.