Hello !
I'm making a SDL projectand I've got an almost empty "Physic Engine" Class with a static attribute (static SDL_Renderer *) and a basic "Game" class that instantiates a physic engine attribute.
I've included physic engine.cpp in game.cpp but it still says it's undefined...
/usr/bin/ld: /tmp/ccV9PwDN.o: warning: relocation against `_ZN12PhysicEngine8rendererE' in read-only section `.text' /usr/bin/ld: /tmp/ccV9PwDN.o: in function `PhysicEngine::PhysicEngine(SDL_Window*)': main.cpp:(.text+0x1f4): undefined reference to `PhysicEngine::renderer' /usr/bin/ld: /tmp/ccV9PwDN.o: in function `Game::Init(char const*)': main.cpp:(.text+0x39a): undefined reference to `PhysicEngine::renderer' /usr/bin/ld: warning: creating DT_TEXTREL in a PIE collect2: error: ld returned 1 exit status
If you want me to provide code don't hesitate to tell me (you can even ping me)
