error while loading shared libraries: libraw.so.15: cannot open shared object file

I've installed libRaw and am compiling the sample .cpp file provided by this command (seen from another discussion):
>> g++ libRaw.cpp -o q -lraw -lm
However, when i run the file,
>> ./q
I get the following error:
./q: error while loading shared libraries: libraw.so.15: cannot open shared object file: No such file or directory

As far as I know, I think this is a linkage problem, however, the path provided in the 'libraw.la' file for 'libraw.so.15' is correctly specified under libdir='/usr/local/lib'.

Please help :)

Forums: 

Hi, what do you mean by

Hi, what do you mean by static build and compile.
I am kinda new to this so if you could please help.
the linkage is supposed to be in the "g++" command right?

Regards

Sorry, no Linux on hands, so

Sorry, no Linux on hands, so could not check the advice:
1) ./configure --enable-shared=no
2) make clean && make # to rebuild
This will remove shared (.so) libraries and will build static (.a) instead

Than build your sample.

If you have installed libraw libraries somewhere in system (/usr/local/lib or so) you may need to deinstall it

-- Alex Tutubalin @LibRaw LLC