am instalat intai zlib
am instalatlibpng care foloseste zlib
am instalat gd
perl -i -p -e s/gd_jpg.o//g Makefile
make INCLUDEDIRS="-I. -I../zlib -I../libpng" LIBDIRS="-L../zlib -L.
-L../libpng" LIBS="-lgd -lpng -lz -lm" CFLAGS="-O -DHAVE_LIBPNG"
makeinstall
pana aici am facut la fel si mrtgul poate genera imagini *.png
am incercat sa generez si eu si da erorile alea
cand i-am dat la compilare:
gcc -o gd_ex gd.cc -L/usr/local/lib -lgd -I/usr/local/include
imi da alte erori legate de generarea pngurilor de genul:
************************************************
/usr/local/lib/libgd.a(gd_png.o)(.text+0x7c): In function `gdPngReadData':
: undefined reference to `png_get_io_ptr'
************************************************
asta inseamna ca nu isi gaseste librariile nu? dar de ce mrtgul stie sa le
gaseasca?
****************************************************
> On Tuesday 15 July 2003 13:24, [EMAIL PROTECTED] wrote:
>
> Arata-ne cum faci make-ul.
>
>
>> Sorry dar va plictisesc iar cu aceeasi problema penibila. Dar chiar nu
>> stiu ce sa mai incerc. Pana acum m incercat tot ce mi-ati recomandat iar
>> rezultatul a fost acelasi. Pls. daca a lucrat cineva cu libgd sa ma
>> scoata
>> si pe mine din ceata.
>>
>> Multumesc anticipat,
>> Adrian.
>>
>> *********************************************
>> iata ce spune make install cand pun libgd:
>> *********************************************
>>
>> sh ./install-item 644 libgd.a /usr/local/lib/libgd.a
>> sh ./install-item 755 pngtogd /usr/local/bin/pngtogd
>> sh ./install-item 755 pngtogd2 /usr/local/bin/pngtogd2
>> sh ./install-item 755 gdtopng /usr/local/bin/gdtopng
>> sh ./install-item 755 gd2topng /usr/local/bin/gd2topng
>> sh ./install-item 755 gd2copypal /usr/local/bin/gd2copypal
>> sh ./install-item 755 gdparttopng /usr/local/bin/gdparttopng
>> sh ./install-item 755 webpng /usr/local/bin/webpng
>> sh ./install-item 755 bdftogd /usr/local/bin/bdftogd
>> sh ./install-item 644 gd.h /usr/local/include/gd.h
>> sh ./install-item 644 gdcache.h /usr/local/include/gdcache.h
>> sh ./install-item 644 gd_io.h /usr/local/include/gd_io.h
>> sh ./install-item 644 gdfontg.h /usr/local/include/gdfontg.h
>> sh ./install-item 644 gdfontl.h /usr/local/include/gdfontl.h
>> sh ./install-item 644 gdfontmb.h /usr/local/include/gdfontmb.h
>> sh ./install-item 644 gdfonts.h /usr/local/include/gdfonts.h
>> sh ./install-item 644 gdfontt.h /usr/local/include/gdfontt.h
>>
>> ***********************************
>> iata ce este in /etc/ld.so.conf
>> ***********************************
>> /usr/local/lib
>> /usr/X11R6/lib
>> /usr/i386-slackware-linux/lib
>> /opt/kde/lib
>> /usr/lib/qt/lib
>>
>> ***************************
>> programelul demo din sursa
>> ***************************
>>
>> /* Bring in gd library functions */
>> #include "gd.h"
>>
>> /* Bring in standard I/O so we can output the PNG to a file */
>> #include <stdio.h>
>>
>> int main() {
>> /* Declare the image */
>> gdImagePtr im;
>> /* Declare output files */
>> FILE *pngout, *jpegout;
>> /* Declare color indexes */
>> int black;
>> int white;
>>
>> /* Allocate the image: 64 pixels across by 64 pixels tall */
>> im = gdImageCreate(64, 64);
>>
>> /* Allocate the color black (red, green and blue all minimum).
>> Since this is the first color in a new image, it will
>> be the background color. */
>> black = gdImageColorAllocate(im, 0, 0, 0);
>>
>> /* Allocate the color white (red, green and blue all maximum). */
>> white = gdImageColorAllocate(im, 255, 255, 255);
>>
>> /* Draw a line from the upper left to the lower right,
>> using white color index. */
>> gdImageLine(im, 0, 0, 63, 63, white);
>>
>> /* Open a file for writing. "wb" means "write binary", important
>> under MSDOS, harmless under Unix. */
>> pngout = fopen("test.png", "wb");
>>
>> /* Do the same for a JPEG-format file. */
>> jpegout = fopen("test.jpg", "wb");
>>
>> /* Output the image to the disk file in PNG format. */
>> gdImagePng(im, pngout);
>>
>> /* Output the same image in JPEG format, using the default
>> JPEG quality setting. */
>> gdImageJpeg(im, jpegout, -1);
>>
>> /* Close the files. */
>> fclose(pngout);
>> fclose(jpegout);
>>
>> /* Destroy the image in memory. */
>> gdImageDestroy(im);
>> }
>>
>> ***********************
>> erorile de la compilare
>> ***********************
>>
>> gd.o(.text+0x18): In function `main':
>> : undefined reference to `gdImageCreate'
>>
>> gd.o(.text+0x2c): In function `main':
>> : undefined reference to `gdImageColorAllocate'
>>
>> gd.o(.text+0x49): In function `main':
>> : undefined reference to `gdImageColorAllocate'
>>
>> gd.o(.text+0x65): In function `main':
>> : undefined reference to `gdImageLine'
>>
>> gd.o(.text+0xa6): In function `main':
>> : undefined reference to `gdImagePng'
>>
>> gd.o(.text+0xb9): In function `main':
>> : undefined reference to `gdImageJpeg'
>>
>> gd.o(.text+0xe3): In function `main':
>> : undefined reference to `gdImageDestroy'
>>
>> collect2: ld returned 1 exit status
>
> --
> Serghei.
>
>