Reputation: 51
This is my very first experience with the MPG123 library, and I'm a bit confused. I found a small example about using this library, with libao, but when i try to compile I got an error.
This is the example code "Play local files": http://hzqtc.github.io/2012/05/play-mp3-with-libmpg123-and-libao.html
I compile with: gcc -O2 -o play play.c -lmpg123 -lao
The error I get is:
/tmp/ccmEoxBp.o: In function `main':
play.c:(.text.startup+0x8d): undefined reference to `mpg123_encsize'
collect2: ld returned 1 exit status
What am I missing?
Upvotes: 1
Views: 922
Reputation: 42040
You have an old version of the mp123 library, according to the release notes it was added in 26.0.26 https://github.com/gypified/libmpg123/blob/master/NEWS.libmpg123
26.0.26 - Added mpg123_encsize(). - Added flag MPG123_SKIP_ID3V2.
Upvotes: 1