[SDL] I can't get to SDL_ttf work
Eric Lilja
mindcooler at gmail.com
Wed Nov 15 15:44:45 PST 2006
Peter Mulholland skrev:
> Hello Eric,
>
> Wednesday, November 15, 2006, 12:45:42 PM, you wrote:
>
>> I developing under cygwin (and I'd like to be able to compile my
>> projects under MSVC++ too) and I need to be able to print some simple
>> text in my SDL programs. I can't build SDL_ttf myself (see thread
>> above). Someone sent me a mingw build of SDL_ttf off-list and my
>> programs compile and link using it but exit right away.
>
> "Exit right away" isn't very helpful - why not run your program
> through GDB or even add some printf() debugging and find out where
> it's causing an exit?
(gdb) run
Starting program: /cygdrive/c/coding/OpenGL/TSBK05/lab1/1-3/sdl/1-3.exe
gdb: unknown target exception 0xc0000135 at 0x7c964ed1
Program received signal ?, Unknown signal.
Program exited with code 030000000465.
You can't do that without a process to debug.
(gdb) bt
No stack.
I said exit right away. It doesn't print anything no matter where I put
it. So the executable gets seriosuly messed up as soon as I link with
the TTF-library. Sigh.
>
>> I don't like glut but I really miss glutBitmapCharacter() now. What
>> should I do? I *need* to be able to print some simple text in my SDL
>> programs (cout in the underlying console is not good enough for me) and
>> I want to continue using SDL but right now it seems I have no choice but
>> to go back to glut. :-(
>
> You could create a bitmap with the contents of a font you'd like to
> print, and then use the blitter functions with appropriate rectangles
> to print strings. This would be faster than using TTF fonts if you
> don't want resizable fonts or Unicode stuff.
>
Sounds like an awful lot of work but thanks for the idea and for your reply.
/ E
More information about the SDL
mailing list