I get the linker error
| | | undefined reference to `___ashrsi3' |
when compiling any code involving sprites. I've narrowed down specifically what code causes the problem:
| | | static void set_sprite(PICTURE *pcptr) { TEXTURE *txptr; txptr = tex_spr + pcptr->texno; slDMACopy((void *)pcptr->pcsrc, (void *)(SpriteVRAM + ((txptr->CGadr) << 3)), (Uint32)((txptr->Hsize * txptr->Vsize * 4) >> (pcptr->cmode))); } |
When I comment out this code, the error goes away. However, then I can't see any sprites. Looking on Google, there seems to be some link with the math library (libm.a). I try to link with the library with -lm, but that doesn't do anything. I also try to add #include <math.h> and that doesn't help either. I'm wondering if maybe ashrsi3 is in an older version of libraries. Does anyone have any idea? |