static linked libgd

From: Date: Fri, 18 Jul 2008 11:04:04 +0000
Subject: static linked libgd
Groups: php.gd.devel 
Request: Send a blank email to php-gd-devel+get-452@lists.php.net to get a copy of this message
Hi, i am new to GD and also to C. I am trying to write a small programm that manipulates an image by adding some text and some simple drawings. The programm will be used on several computers, so i try to link all the libs statically. When i try to compile my test program with gcc lines2jpg.c -lgd -ljpeg -static the compiler says ############# /usr/lib64/gcc/x86_64-suse-linux/4.2.1/../../../../lib64/libgd.a(gd.o): In function `lsqrt': (.text+0x319a): undefined reference to `sqrt' /usr/lib64/gcc/x86_64-suse-linux/4.2.1/../../../../lib64/libgd.a(gd.o): In function `gdImageCopyRotated': (.text+0x3207): undefined reference to `sqrt' /usr/lib64/gcc/x86_64-suse-linux/4.2.1/../../../../lib64/libgd.a(gd.o): In function `gdImageCopyRotated': (.text+0x322c): undefined reference to `cos' /usr/lib64/gcc/x86_64-suse-linux/4.2.1/../../../../lib64/libgd.a(gd.o): In function `gdImageCopyRotated': (.text+0x3240): undefined reference to `sin' /usr/lib64/gcc/x86_64-suse-linux/4.2.1/../../../../lib64/libgd.a(gd.o): In function `gdImageDashedLine': (.text+0x3f74): undefined reference to `atan2' /usr/lib64/gcc/x86_64-suse-linux/4.2.1/../../../../lib64/libgd.a(gd.o): In function `gdImageDashedLine': (.text+0x3f79): undefined reference to `sin' /usr/lib64/gcc/x86_64-suse-linux/4.2.1/../../../../lib64/libgd.a(gd.o): In function `gdImageDashedLine': (.text+0x4089): undefined reference to `atan2' /usr/lib64/gcc/x86_64-suse-linux/4.2.1/../../../../lib64/libgd.a(gd.o): In function `gdImageDashedLine': (.text+0x408e): undefined reference to `sin' /usr/lib64/gcc/x86_64-suse-linux/4.2.1/../../../../lib64/libgd.a(gd.o): In function `gdImageLine': (.text+0x46b6): undefined reference to `atan2' /usr/lib64/gcc/x86_64-suse-linux/4.2.1/../../../../lib64/libgd.a(gd.o): In function `gdImageLine': (.text+0x46bb): undefined reference to `cos' /usr/lib64/gcc/x86_64-suse-linux/4.2.1/../../../../lib64/libgd.a(gd.o): In function `gdImageLine': (.text+0x477b): undefined reference to `atan2' /usr/lib64/gcc/x86_64-suse-linux/4.2.1/../../../../lib64/libgd.a(gd.o): In function `gdImageLine': (.text+0x4780): undefined reference to `sin' collect2: ld returned 1 exit status #################### I also included <math.h> but the result is the same. Any help is apreciated! Thanks, Yann

« previous php.gd.devel (#452) next »