[pulseaudio-discuss] where to find pa_simple_new functions

Tanu Kaskinen tanuk at iki.fi
Sun Sep 20 23:09:25 PDT 2015


On Sun, 2015-09-20 at 20:20 +0200, Rainer Blickle wrote:
> Hi folks,
>  
> i'm trying to develop an application which uses pulseaudio for sound
> output. I wan to use the simple api.
>  
> The environment of my application is Java, so i use a shared library
> with JNI. In this shared library i am calling (beside others)
> pa_simple_new.
> 
>  
> I compile the shared library with:
> 
> 
> gcc -I/usr/lib/jvm/java-8-oracle/include -I/usr/lib/jvm/java-8
> -oracle/include/linux -L/usr/lib/x86_64-linux-gnu/ -o
> libaudioserver.so  -lpulse-simple -shared -fPIC
> de_blickle_audioserver_pulseaudio_PulseAudioClient.c
>  
> so i link against libpulse-simple.so. I thought in the shared library
> there are the functions for the simple api. But when showing the
> symbols of libpulse-simple, nm returns no symbol at all.

Try the -D (--dynamic) switch with nm.

> When showing the dependencies of my shared library (libaudioserver.so
> ), no pulseaudio-lib is shown:
> 
> ldd libaudioserver.so
>     linux-vdso.so.1 =>  (0x00007ffe5b5d5000)
>     libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6c797c5000)
>     /lib64/ld-linux-x86-64.so.2 (0x00007f6c79d8c000)
>  
> When executing my program it compains with
> 
> /usr/lib/jvm/java-8-oracle/bin/java: symbol lookup error:
> /home/rainer/NetBeansProjects/audioserver/src/main/native/libaudioser
> ver.so: undefined symbol: pa_simple_new
>  
> So my question is:
>  
> Where do i get the symbols for the simple api from. Is there another
> shared library i have to reference ?

libpulse-simple is the correct library. I don't know why it's not
getting linked to libaudioserver.so.

-- 
Tanu



More information about the pulseaudio-discuss mailing list