in reply to Inline::C and gd
This works for me (you can place the "include" within the code section). Your problem is quite odd since the c example works while the perl does not. If you do a "perl -V" do you see /usr/lib in the linker and libs section? Was your perl compiled with gcc? If it was another compiler/linker, that linker may not know about /usr/lib.
-derby#!/usr/local/bin/perl use Inline C => DATA => LIBS => '-lgd'; outtext(); __END__ __C__ #include "gd.h" int outtext() { gdImagePtr im; FILE *out; im = gdImageCreate(100,100); out = fopen("foo.jpg", "wb"); gdImageJpeg(im, out,-1); fclose(out); gdImageDestroy(im); return 1; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Inline::C and gd
by Beatnik (Parson) on May 26, 2002 at 13:28 UTC | |
by derby (Abbot) on May 26, 2002 at 13:47 UTC | |
by Beatnik (Parson) on May 26, 2002 at 13:49 UTC | |
by tadman (Prior) on May 27, 2002 at 06:48 UTC |