In function `lcd_draw_circle': lcd.c:(.text+0x2d8): undefined reference to `__aeabi_idiv' lcd

来源:互联网 发布:象棋软件排行 编辑:程序博客网 时间:2024/06/12 00:15

环境 VMware® Workstation 9.0.2 build-1031769

gcc (GCC) 4.6.0 20110428 (Red Hat 4.6.0-6)@fedora15
arm-none-linux-gnueabi-gcc (ctng-1.6.1) 4.4.3

arm926裸机开发


// 绘制同心圆
void lcd_draw_circle(void)
{
int x,y;
int color;
unsigned char red,green,blue,alpha;
int xsize = ROWSIZE;
int ysize = COLSIZE;


for (y = 0; y < ysize; y++)
for (x = 0; x < xsize; x++)
{
color = ((x-xsize/2)*(x-xsize/2) + (y-ysize/2)*(y-ysize/2))/64;
red   = (color/8) % 256;
green = (color/4) % 256;
blue  = (color/2) % 256;
alpha = (color*2) % 256;
color |= ((int)red   << 11);
color |= ((int)green << 5 );
color |= ((int)blue       );


lcd_draw_pixel(x,y,color);
}
}

color = ((x-xsize/2)*(x-xsize/2) + (y-ysize/2)*(y-ysize/2))/64;

改为:

color = ((x-xsize/2)*(x-xsize/2) /25+ (y-ysize/2)*(y-ysize/2)/9);

报错,错误信息:

lcd.o: In function `lcd_draw_circle':

lcd.c:(.text+0x2d8): undefined reference to `__aeabi_idiv'

lcd.c:(.text+0x2e4): undefined reference to `__aeabi_idiv'



阅读全文
0 0
原创粉丝点击