From: Takashi Iwai Subject: Re: Alsa not working when linked to a library Date: Tue, 29 Sep 2009 11:27:35 +0200 Message-ID: References: <4ABCF86E.40801@mta.it> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 2AFA0103845 for ; Tue, 29 Sep 2009 11:27:36 +0200 (CEST) In-Reply-To: <4ABCF86E.40801@mta.it> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Fortini Matteo Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Fri, 25 Sep 2009 19:05:50 +0200, Fortini Matteo wrote: > > Hi, > I'm experiencing a very strange behavior. > > I'm using alsa 1.0.18 on a powerpc platform. > > If I run the following simple code from the main of a .c file, it works > perfectly, but if I put into a shared .so library (libaudio.so), then I > link the main with -laudio -lasound, then the hwparams structure is not > filled with anything, while the alsa functions don't return any error. > > Do you have any clue why this could happen? I guess it's an issue regarding the versioned symbols. Your library (libaudio.so) should be also linked with libasound.so so that the linker can pick up the proper versioned symbols. Takashi