Possible error in gd_bmp.c in code compiling

Issue #105 new
Former user created an issue

Cross Compiling gdlib 2.1.0 for mips I had the following error in linking: libtool: link: /opt/BuildRoot/bin/mips-linux-gcc -std=gnu99 -I/opt/BuildRoot/include -o .libs/gdcmpgif gdcmpgif.o -L/opt/BuildRoot/lib ./.libs/libgd.so /opt/BuildRoot/lib/libfontconfig.so /opt/BuildRoot/lib/libfreetype.so /opt/BuildRoot/lib/libexpat.so /opt/BuildRoot/lib/libpng16.so -lz -lm -pthread -Wl,-rpath -Wl,/opt/BuildRoot/lib ./.libs/libgd.so: undefined reference to `ceill'

I modified gd_bmp.c at line 795 from padding = ((int)ceill(0.1 * info->width)) % 4; to padding = ((int)ceil(0.1 * info->width)) % 4; now it works

Comments (1)

  1. Pierre Joye

    I do not have mips support nor the tools to try it.

    I am not sure ceil is good here as it is really about using the right type. Is there any alternative function for this platform using the right type?

    Can you post a patch (upload/attach) pls?

  2. Log in to comment