hi, i've catch the same problem before.
so if you want to reuse your code, write it independently. i mean, don't do any render, or use any class, library... like sfml. use basic data structure.
for example: if you want to render a character, create 'Character' class, hold infomation for position(int), name(string), class(string), etc. your class should not have any field like Sprite, Font, Model, or any class from sfml(or any library)
and, for each library you use, create a new class named 'CharacterRender' that render the 'Character' class above. and of course, it should have Sprite, Font, Model...