I am going to assume that you are using MSVS based on the stdafx.h header. When you enable static libraries, you need to not only include the necessary header files, but you must reference the static library file, that is, the .lib file. I assume that project X has access to this .lib file, while project Y does not work.
Perhaps through properties-> general properties-> Links, and then βadd a new linkβ to point to both libraries.
Y, Project X, A, B ? , Y, . , , , . ( ) MSVS. , , . ( , "properties- > common properties- > References" ..).
.lib , "properties- > Configuration Properties- > Linker- > Input- > Additional dependencies" , "properties- > - > Linker- > General- > "
,