Not able to use Libraw 0.21.1 for intel mac

I downloaded the libraw binaries from the download page for macos

my macos version is 11.7.4, using in c++ gives me linked x86_64 architecture symbol(s) not found error...

I have also tried building it from scratch using both

make and
make - f makefile.dist

in that case I run into the following error when I try to run the file from another computer
< It was codesigned and notarized >

Reason: tried: '/usr/local/opt/libraw/lib/libraw.23.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/libraw/lib/libraw.23.dylib' (no such file), '/usr/local/opt/libraw/lib/libraw.23.dylib' (no such file), '/usr/lib/libraw.23.dylib' (no such file, not in dyld cache)

Can help? running on a deadline here

Forums: 

it looks like 'your file from

it looks like 'your file from another computer' is dynamically linked with libraw.23.dylib

We do not provide dynamic LibRaw for macOS, make -f Makefile.dist will also create static library only.

Please contact the 'file from another computer' vendor for libraw.23.dylib library

-- Alex Tutubalin @LibRaw LLC

So I tried building my

So I tried building my program again using the libraw 0.21.1 binaries provided for macos..

I used the command

g++ --std=c++17 -I/Users/aayush/Downloads/LibRaw-0.21.1/libraw -L/Users/aayush/Downloads/LibRaw-0.21.1/lib base64.cpp Server-mac.cpp -o Ninja -lm /Users/aayush/Downloads/LibRaw-0.21.1/lib/libraw.a

and I seem to get the following error

Undefined symbols for architecture x86_64:
"_uncompress", referenced from:
LibRaw::deflate_dng_load_raw() in libraw.a(fp_dng.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1

I also tried using -lraw instead of adding the full path name to libraw.a still got the same error