The tweak is only in the Config line..Had problems bootstrapping Inline module 'gdexample2_pl_9960' Can't load '/path/_Inline/lib/auto/gdexample2_pl_9960/gdexample2_pl_99 +60.so' for module gdexample2_pl_9960: /path/_Inline/lib/auto/gdexampl +e2_pl_9960/gdexample2_pl_9960.so: undefined symbol: jpeg_destroy at / +usr/lib/perl5/5.6.1/i386-linux/DynaLoader.pm line 206. DynaLoader::croak('Can\'t load \'/path/_Inline/lib/auto/gdex...') +called at /usr/lib/perl5/5.6.1/i386-linux/DynaLoader.pm line 206 DynaLoader::bootstrap('gdexample2_pl_9960') called at (eval 26) li +ne 9 eval ' package main; push @main::ISA, qw(gdexample2_pl_9960) unless $module eq "main"; local $gdexample2_pl_9960::VERSION = \'0.00\'; package gdexample2_pl_9960; push @gdexample2_pl_9960::ISA, qw(Exporter DynaLoader); sub dl_load_flags { 0x00 } gdexample2_pl_9960::->bootstrap; ;' called at /usr/lib/perl5/site_perl/5.6.1/Inline.pm line 432 Inline::load('Inline::C=HASH(0x8107f58)') called at /usr/lib/perl5 +/site_perl/5.6.1/Inline.pm line 267 Inline::glue('Inline::C=HASH(0 +x8107f58)') called at /usr/lib/perl5/site_perl/5.6.1/Inline.pm line 1 +94 Inline::init called at (eval 1) line 5 Inline::INIT() called at (eval 26) line 0 eval {...} called at (eval 26) line 0 at gdexample2.pl line 0 INIT failed--call queue aborted.
I have no idea what this all means altho I guess it has to do with loading up the XS linked code into the perl module :)> use Inline 'NOCLEAN'; use Inline 'C' => 'Config' => AUTO_INCLUDE => '#include "gd.h"', 'INC' => '-I/usr/include ', 'LIBS' => '-L/usr/lib -lgd ', ;
Now I assume I'll need to include libpng too when I want to do PNG based stuff :)#!/usr/bin/perl use Inline Config => FORCE_BUILD => 1, CLEAN_AFTER_BUILD => 0; use Inline C => Config => LIBS => '-L/usr/lib -lgd -ljpeg', INC => '-I/usr/include', AUTO_INCLUDE => '#include "gd.h"'; 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; }
In reply to Re: Inline::C and gd
by Beatnik
in thread Inline::C and gd
by Beatnik
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |