Re: [linux-audio-dev] Compiling with libsndfile

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] Compiling with libsndfile
From: Paul Davis (paul_AT_linuxaudiosystems.com)
Date: Wed Apr 09 2003 - 18:39:42 EEST


>Thanks for your reply, Erik.
>
>I see now that there is some info about using pkg-config in the
>documentation, but I hadn't understood its significance, being fairly
>new to Linux development.
>
>What I have is a simple test app that just opens an audio file and
>prints out the properties.
>
>I'm compiling it with
>
>gcc test.c -o test `pkg-config --cflags --libs sndfile`
>
>But I always get the result
>
>./test: error while loading shared libraries: libsndfile.so.1: cannot
>open shared object file: No such file or directory.
>
>The headers and libraries referenced by pkg-config all seem to be in the
>right place.

as it would have indicated during the install of libsndfile, you need
to either:

   set LD_LIBRARY_PATH to include wherever the library is located OR
   edit /etc/ld.so.config to contain the directory where the library
      is located, and then run ldconfig (as root)

shared libraries are found by using a combination of LD_LIBRARY_PATH
and the ld.so.config file. if a library cannot be found that way
(though strictly, there are a couple of other (bad) options), then you
get the error you've encountered.

--p


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Wed Apr 09 2003 - 18:57:34 EEST