Hi Josef,
Op 28-11-10 01:38, Josef Ahmad schreef:
> Hi Kristoff,
> put "-lpthread -lsndfile -lrt" *after* "wav2ambe.c"
Well, that seams to make it even worse:
$ gcc -static -o wav2ambe wav2ambe.c -lsndfile -lpthread -lrt
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/libsndfile.a(caf.o):
In function `caf_open':
(.text+0xa56): undefined reference to `lrint'
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/libsndfile.a(flac.o):
In function `flac_write_d2flac':
(...)
(411 lines of error-messages).
By the way:
- I have tried this on three different versions of linux: Ubuntu 10.04
(gcc 4.4.3), CentOS 5.5 (gcc 4.1.2) and Debian/ppc (gcc 4.3.2): all the
same result.
So this is not related to one particular version of gcc or linux.
- The following also gives the same result:
$ gcc -o wav2ambe /usr/lib/libsndfile.a /usr/lib/libpthread.a
/usr/lib/librt.a wav2ambe.c
/tmp/cceYqhlc.o: In function `main':
wav2ambe.c:(.text+0x11ff): undefined reference to `sf_open'
wav2ambe.c:(.text+0x1593): undefined reference to `pthread_create'
wav2ambe.c:(.text+0x1666): undefined reference to `timer_create'
wav2ambe.c:(.text+0x16f8): undefined reference to `timer_settime'
wav2ambe.c:(.text+0x1782): undefined reference to `sf_read_short'
wav2ambe.c:(.text+0x18ff): undefined reference to `timer_settime'
collect2: ld returned 1 exit status
So it must really be something I do wrong.
Anybody any idea?
Greetings,
J.
Cheerio! Kr. Bonne.