请问下关于libmpg123库使用的有关问题

请教下关于libmpg123库使用的问题
请教下使用过libmpg123库做开发的朋友,我是在Ubuntu环境下,用codeblock作IDE,在c++的文档里面加入了mpg123.h,可是编译结果都是说undefined reference to “mpg123_init”。 mpg123_init是mpg123.h里面声明的函数,并没有函数具体表达式。
看了几个使用这个库的例子,貌似都只需要加入mpg123.h,不知道为什么不会出现错误?
------解决思路----------------------
right click on your project->build option->main->linker setting->Add

then in the popup, browse to the folder that contains the libmpg123 library
------解决思路----------------------
光有声明是不行的,还需要实现;声明只是在编译阶段不报错,最后链接是找不到实现所以报  undefined reference to .... 错误,你需要将libmpg123 编译成一个静(动)态库,然后链接;也可以把 libmpg123 源码加入你的工程一起编译