Let’s say I have 3 projects in my Eclipse workspace, namely FooServer, FooClient and FooShared. I own and modify the code in all 3 of them regularly and both the server and client part use code from the shared part.
Is there a way to tell Eclipse I want FooShared to be used as a library in them, similar to Visual Studio’s “Add Reference…” for .NET projects? (as opposed to setting everything up like the include path and all manually)
This depends how these projects are built, and whether they have a makefile, etc…
But as a simple answer, try going to your project properties, C++ project path, then you can add whatever other projects in the workspace. whether this is enough I don’t know I never tried it myself
A better way is to explicitly add the libraries that your project depends on to the CMakeLists.txt file see this tutorial on how to import other targets to your project