I'm writing a small game, and I've been getting an almost pathetic bug
with SDL.
I've written a small wrapper (textutil.h:rtTextUtil) to make rendering
easy.
Now if i call it from a class defined in a header file
(class.h:ClassGood), it works fine, but if i call it in a class
declared in a header file but defined in a .cpp (ClassBad) it
segfaults.
gdb reports the bug is in TTF, since it crashes on any TTF_* call.
I've put together a program just to demonstrate the bug.
http://fileurls.com/gojjhy
I would really appreciate it if someone could try it. To see what i
mean by not segfaulting on ClassGood, you could try uncommenting the
line (43) in main.cpp and commenting line 42.
Just so you know, I'm facing these bugs using g++, SDL 1.2 running on
linux.