0

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;

}
  • Did you install `libraw`? If yes, do you know where the `libraw.so` file is located? If yes, add `-L` to your command. – jweyrich Mar 25 '19 at 14:21
  • i have installed libraw using ./configure , make , sudo make install . Does it intall it properly. There is no file names libraw.so.19 in the folder. I think , it isn't intalled properly in the system – Devendra shaktawat Mar 25 '19 at 14:25
  • https://www.libraw.org/node/2171 , this link doesn't solve my problem , please help – Devendra shaktawat Mar 25 '19 at 14:26

1 Answers1

0

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

risbo
  • 188
  • 7