inline function error

I'm using a inlined function that when called elsewhere causes an undefined reference error.

1
2
3
4
5
6
7
8
9
//inlined function
SDL_Renderer* Sol_Window::get_renderer() {
    return renderer;
}

//elsewhere in code (causes error)
//win is a Sol_Window object.
win.get_renderer();
//... 


Why does this happen? What is it that I'm missing about inlined functions?
Last edited on
Inline functions must be defined in every translation unit where it's used.
Topic archived. No new replies allowed.