uite sper ca asta te lamureste:
[EMAIL PROTECTED]:~] # gvim test.c
[EMAIL PROTECTED]:~] # gcc -o test test.c
/tmp/cc9eIL1b.o(.text+0x20): In function `main':
: undefined reference to `gdImageCreate'
/tmp/cc9eIL1b.o(.text+0x46): In function `main':
: undefined reference to `gdImageColorAllocate'
/tmp/cc9eIL1b.o(.text+0x6c): In function `main':
: undefined reference to `gdImageColorAllocate'
/tmp/cc9eIL1b.o(.text+0xa1): In function `main':
: undefined reference to `gdImageLine'
/tmp/cc9eIL1b.o(.text+0xe1): In function `main':
: undefined reference to `gdImagePng'
/tmp/cc9eIL1b.o(.text+0xfb): In function `main':
: undefined reference to `gdImageJpeg'
/tmp/cc9eIL1b.o(.text+0x11c): In function `main':
: undefined reference to `gdImageDestroy'
collect2: ld returned 1 exit status
[EMAIL PROTECTED]:~] # gcc -o test test.c -lgd
[EMAIL PROTECTED]:~]
unde test.c este bucatica de cod expusa de tine in mail.
On Tue, 2003-07-15 at 13:24, [EMAIL PROTECTED] wrote:
> 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
>
--
Alexandru N. Barloiu <[EMAIL PROTECTED]>
Dale Media