Hi,

I fixed it. This is the code I'm currently using :)
The difference is in the -ljpeg ofcourse, which is a bit strange since I didnt have to 
include it in the pure C version.
Since gd also used png, I might need to include libpng in there too if I wanna use it.

Another question I have... Brian spoke about stuffing all those params to Config in 
one go but isnt the FORCE_REBUILD going to Inline while LIBS is going to Inline::C or 
am I mistaking?

How difficult is it to use the generated files and switch to XS from here?

a lot of thanks again, you guys have been most helpfull !

---

#!/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;
}


---
Greetz 

Hendrik 

.... Quidquid latine dictum sit, altum viditur. 

Reply via email to