Beatnik has asked for the wisdom of the Perl Monks concerning the following question:
Error returned is :perl: relocation error: /path/_Inline/lib/auto/gdexample_pl_2120/gdexample_pl_2120.so: undefined symbol: gdImageCreate Needless to say gdImageCreate is a function in the gd lib.#!/usr/bin/perl use Inline Config => FORCE_BUILD => 1, CLEAN_AFTER_BUILD => 0; use Inline C => Config => LIBS => '-L/usr/lib -lgd'; #I tried variations of the above line use Inline C => Config => AUTO_INCLUDE => '#include "gd.h"'; #Apparently can't use #include "gd.h" in the code itself use Inline C => 'DATA'; outtext(); __END__ __C__ 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; }
with gcc -o gdexample gdexample.c -lgd Any help would be appreciated a lot...#include <stdio.h> #include "gd.h" int main(void) { 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: Inline::C and gd
by rob_au (Abbot) on May 26, 2002 at 13:42 UTC | |
by Beatnik (Parson) on May 26, 2002 at 13:45 UTC | |
|
Re: Inline::C and gd
by derby (Abbot) on May 26, 2002 at 13:16 UTC | |
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 | |
|
Re: Inline::C and gd
by Beatnik (Parson) on May 26, 2002 at 21:56 UTC |