Fadone Tech
Fadone Tech

Reputation: 36

How to statically link libsndfile.so.1?

I am trying to statically link libsndfile.so.1 in meson.build file But its looking for package instead of libsndfile i build.

I built the libsndfile using the following commands:

./configure --enable-static
make
sudo make install

Then i added this to meson.build file:

rubberband_library = library(
  rubberband_library_name,
  objects: rubberband_objlib.extract_all_objects(recursive: true),
  link_args: [
    arch_flags,
    feature_libraries,
    '-L/usr/local/lib', # Added this, this is where libsndfile.so is stored
    '-lsndfile', # Added this
  ],
  dependencies: [
    rubberband_objlib_dep,
    general_dependencies,
  ],
  version: rubberband_dynamic_library_version,
  install: true,
)

After running, I am getting the following error,

/usr/bin/ld: cannot find /usr/lib/x86_64-linux-gnu/libsndfile.so: No such file or directory

Its still looking for libsndfile package, but i specified my path to that package. How do i fix that?

Upvotes: 1

Views: 104

Answers (0)

Related Questions