ERROR while compilation of libraw program

320 views Asked by At

I am trying to compile this simple program of libraw, the readraw formed after g++ libraw.cpp -o readraw -lraw -lm gives following error

./readraw: error while loading shared libraries: libraw.so.19: cannot open shared object file: No such file or directory

#include <iostream>
#include <memory>
#include "libraw/libraw.h"

int main()
{
   LibRaw RawProcessor;
   RawProcessor.open_file("sample.raw12");
   printf("Image size: %d x %d\n",RawProcessor.imgdata.sizes.width,RawProcessor.imgdata.sizes.height);
   RawProcessor.unpack();
   RawProcessor.raw2image();

   for(int ii = 0; ii < RawProcessor.imgdata.sizes.iwidth * RawProcessor.imgdata.sizes.iheight; ii++)
   {
      printf("i=%d R=%d G=%d B=%d G2=%d\n", ii,
         RawProcessor.imgdata.image[ii][0],
         RawProcessor.imgdata.image[ii][1],
         RawProcessor.imgdata.image[ii][2],
         RawProcessor.imgdata.image[ii][3]  );
   }

   RawProcessor.recycle();
   return 0;

}
1

There are 1 answers

2
risbo On

probably you should configure linker (ld) using ldconfig utility.