al_draw_text doesn´t work
i have tried to get al_draw_text working but it wont work.
an the end, to minimize my coding-faults, i have compiled the example code from
1:1 (with download of the pirulen.ttf font) and if i run the .exe he still crashes. gdb says:
Starting program: M:\test.exe
[New Thread 1284.0x890]
[New Thread 1284.0xf74]
[New Thread 1284.0xcd8]
[New Thread 1284.0x544]
Program received signal SIGSEGV, Segmentation fault.
0x6428de49 in al_draw_ustr () from M:\allegro-5.0.7-monolith-mt.dll
compiler is gcc 4.7.0(mingw), allego 5.0.7 monolith-mt, os: win7 64.
what can i do to fix this?
Have you tried to change the pirulen.ttf to arial.ttf?
Have you checked the return value when you load the font? ie: the font isn't NULL?
yes, have tried arial also and the return value of al_load_ttf_font
is already tested in the example code:
fprintf(stderr, "Could not load 'pirulen.ttf'.\n");
The example you pointed to doesn't use al_draw_ustr(), is that the only line of code you changed? Could you post it?
>The example you pointed to doesn't use al_draw_ustr(), is that the only line of code you changed?
i haven´t change any piece of the code. but gdb gives me this error.
I don't think the binaries are compatible with gcc 4.7. If your code is correct, that is probably your problem.
Thread #610886. Printed from Allegro.cc
>I don't think the binaries are compatible with gcc 4.7. If your code is correct, that is probably your problem.
yes, that was it. have downloaded 4.6.2 and now it works.