The following approach assumes that each .EXE / application (which uses this library) has its own Visual Studio solution.
You have control over the library, right? Steps 1-3 will make changes to the project file, and step 4 adds the file to the library source code.
Set project properties> C / C ++> Advanced> Strength Turns On mylibrary_solution_defines.h.
Change project properties> C / C ++> General> Additional inclusion directories to be placed $(SolutionDir);at the beginning of the directory list.
a > > - . , $(SolutionDir)$(ProjectName)\$(Configuration)? , ; .lib .obj.
, mylibrary_solution_defines.h , #include "mylibrary_solution_defines.h" .
/EXE- - , , - mylibrary_solution_defines.h #defines .
, ? #include "mylibrary_solution_defines.h", . , . , ConsoleModeInterfaceProgram.sln , #define TEXTONLY 1, mylibrary_solution_defines.h, , ConsoleModeInterfaceProgram.sln.