헤더에 함수 정의까지 써 놓고

씨벌 왜 컴파일이 안되지 자꾸 링킹에러나길래


생각해보니 클래스 내부 멤버함수만 자동으로 인라인화 해주는 거였는데

까먹고 있었다


utilities.h ....


before


void logSDLError(const std::string& msg, std::ostream& os = std::cout)

{

    os << msg.c_str() << "error: " << SDL_GetError() << std::endl;

}


after


inline void logSDLError(const std::string& msg, std::ostream& os = std::cout)

{

    os << msg.c_str() << "error: " << SDL_GetError() << std::endl;

}


댕청...

여튼 해결!