Thanks Tanu, I followed your instructions. I was able to solve this problem. I had made the new function ?GLOBAL?. I edited the ?map-file? in src folder of pulseaudio to include the newly created function. I was also able to successfully compile my test program too.. But when I run the binary, I am getting relocation error.. ./pa_listclients_pause: relocation error: ./pa_listclients_pause: symbol pa_context_set_sink_input_paused, version PULSE_0 not defined in file libpulse.so.0 with link time reference I am not able to understand this error.. Can someone help me with this, Thanks, Sathish On 20 December 2013 18:21, Tanu Kaskinen <tanu.kaskinen at linux.intel.com>wrote: > [Why is every line that you write prefixed with ">"? That's usually only > used for quoted text.] > > On Fri, 2013-12-20 at 09:48 +0530, sathishkumar sivagurunathan wrote: > > > > > > Hi , > > > > > > I am trying to add a new function "pa_context_set_sink_input_paused" to > > the pulseaudio introspect.c file. I was able to able and successfully > > compile pulseaudio too.. > > > > > > gcc pa_listclients_pause.c -o pa_listclients_pause -L > > /home/sathish/Desktop/pulseaudio-4.0/build/src/.libs/ -lpulse > > > > > > /tmp/ccueP47b.o: In function `pa_get_devicelist': > > > > > > pa_listclients_pause.c.text+0x6cb): undefined reference to > > `pa_context_set_sink_input_paused' > > > > > > collect2: error: ld returned 1 exit status > > > > > > But when I try to run a program using this new function, it returns me > > "undefined reference". > > > > > > I tried to run the nm command and check whether the new function is > > present in libpulse.so > > > > > > The function returns me it has found it.. > > > > > > nm -A *.so | grep "pa_context_set_sink_input_paused" > > > > > > libpulse.so:0001d4a0 t pa_context_set_sink_input_paused > > > > > > I am not able to comprehend what is happening. Can you help me with > this > > ?? > > Notice the "t" in the nm output. It means that the symbol is in the text > (code) section, but more importantly, it means that the symbol is local > to the library, not exported to outside world. An exported symbol would > have upper case "T". > > The most likely reason why the symbol isn't exported is that you didn't > add the new function to src/map-file. All functions in libpulse that are > supposed to be used by applications need to be added to src/map-file. > > -- > Tanu > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20131220/7b2e1ed4/attachment-0001.html>