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: Rohan Parkes (rparkes_AT_email.com)
Date: Wed Apr 09 2003 - 18:09:18 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.

I'm presumably doing something wrong, but can't see what it is.

Rohan Parkes
Melbourne
Australia

On Tue, 2003-04-08 at 18:18, Erik de Castro Lopo wrote:
> On 08 Apr 2003 15:51:11 +1000
> Rohan Parkes <rparkes_AT_email.com> wrote:
>
> >
> > gcc `sndfile-config --libs` file1.o file2.o -o program.
>
> Thats for the old version. Nowadays (in fact for the last 15 months) you
> do:
>
> gcc `pkg-config --libs sndfile` file1.o file2.o -o program
>
> Similarly, for compiling a C file to an object:
>
> gcc `pkg-config --cflags sndfile` -c file.c
>
> pkg-config is now the standard way of doing things like this.
>
> Erik (the author :-))
> --
> +-----------------------------------------------------------+
> Erik de Castro Lopo nospam_AT_mega-nerd.com (Yes it's valid)
> +-----------------------------------------------------------+
> "It's far too easy to make fun of Microsoft products, but it takes a
> real man to make them work, and a god to make them do anything useful"
> -- Anonymous


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:28:40 EEST