[fpc-pascal] libsndfile library
Marc Santhoff
M.Santhoff at t-online.de
Mon May 7 19:24:08 CEST 2007
Am Montag, den 07.05.2007, 10:01 +0200 schrieb Tiziano_mk:
> Marco van de Voort wrote:
> >> On Linux I found only the sndfile unit (packages\extra\sndfile\).
> >>
> >> This require the presence of sndlife library on the distribution.
> >>
> >> In my PC I have Ubuntu 6.06 with libsndfile installed (dynamic library
> >> only):
> >
> >> /usr/lib/libsndfile.so.1.0.12
> >> /usr/lib/libsndfile.so.1
> >
> > Your Linux system is not properly configured for libsndfile development.
> neither for other kind of develpment libraries (ncurses, sqlite, etc,
> etc) indeed.
> Each time I try something that needs a link to a library I have to spend
> my weekends trying to fild what is missing... :-(
I'm not using Linux, but doesn't ldconfig exist there?
On FreeBSD you can do:
$ ldconfig -r|grep sndfile
463:-lsndfile.1 => /usr/local/lib/libsndfile.so.1
So you know what's there. AFAIR in the link.sh script in the build
directory after fpc failed there are hints on where fpc is searching.
After asking ldconfig after what it found you could look further:
$ ls -l /usr/local/lib/libsndfile*
-rw-r--r-- 1 root wheel 425514 26 Mai 2005 /usr/local/lib/libsndfile.a
lrwxr-xr-x 1 root wheel 15 26 Mai 2005 /usr/local/lib/libsndfile.so -> libsndfile.so.1
-rwxr-xr-x 1 root wheel 359904 26 Mai 2005 /usr/local/lib/libsndfile.so.1
(sorry for long lines)
If you set the link a short ldconfig -R rescans the library dirs and it
should work.
> >
> > You miss the symlink from libsndfile.so -> libsndfile.so.1.0.12
> >
> >> /usr/bin/ld: cannot find -lsndfile
> >> sound.pas(34,1) Error: Error while linking
> >>
> >> (note: the -Fl statements in fpc.cfg are tuned on /usr/ and /usr/lib/ so
> >> the real problem is that I don't have the static library)
> >>
> >> There is a chance to have my program linked on a system where I only
> >> have the Dynamic Libray?
> >
> > A -lxxx searches for libxxx.so only, not for variants. Create symlinks if
> > necessary or try to install packages that might create symlinks (like -dev
> > packages on RedHat)
>
> Ok, I'll try that, thanks. But the same problem could happen in other
> PCs where my program could be deployed...
Try "man ldconfig" and read more about the linux specific switches ...
Hope it helps,
Marc
More information about the fpc-pascal
mailing list