일단 설명을 해드리자면

//--- inside of Gay.h
template <typename T>
T Gay(const T& t);

//--- Inside of Gay.cpp
include <iostream>
template <typename T>
T Gay(const T& t)
{
   cout << "I've come out this morning, my girlfriend was surprised the most"
}

//---main.cpp
#include "Gay.h"
int main()
{
  int b = Gay(5);
  return 0;
}

하지만 이게 틀린이유는 Gay.h를 추가한다고 template T란 아는것은 아니기 떄문입니다.
그리고 이건 프로젝트 링크의 문재도 아닙니다. 그냥 main이 template T를 알지 못하기 때문이죠

이걸 고치려면

2가지 방법이있습니다.

a)
//--- Inside of Gay.cpp
include <iostream>
template <typename T>
export Gay(const T& t)
{
   cout << "I've come out this morning, my girlfriend was surprised the most"
}


b)
//--- Inside of Gay.cpp
include <iostream>
template <typename T>
inline Gay(const T& t)
{
   cout << "I've come out this morning, my girlfriend was surprised the most"
}
하는것이죠
어떤 컴파일러를 쓰냐에 따라 달려있지만 주로 b)를 쓰는것을 추천합니다. a)는 사용하는 컴파일러에 따라 서포팅을 안해줄수도 있기때문이죠ㅕ;.