Q: Error on compiling/linking
Hello,
I'm new to ALSA and I have a problem on programming the library:
On my system ALSA library 0.9.7 and ALSA 0.9.7 driver is installed. According to the api-documentation on the ALSA project site, I tried to do something like:
snd_seq_client_info_t *info;snd_seq_client_info_malloc ( &info );snd_seq_get_client_info( seq_handle, info );
... do sth. like readout name with snd_seq_client_info_get_name( info );
snd_seq_client_info_free ( info );
When compiling/linking, I receive:
"undefined reference to `snd_seq_client_info_malloc'"
Same for snd_seq_client_info_get_name and for snd_seq_client_info_free.
What's wrong? Is'nt my lib up to date? (I read that the sequencer api has been rewritten with get/set functions, but in which version?)
Thanks for answers or links to some introduction sites.
Berhnard
Signature · 17 lines
--------------------------------- Bernhard Gerlach Fraunhofer AEMT Am Helmholtzring 1 (Haus M) 98693 Ilmenau Germany mail: [email protected] --------------------------------- ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php
At Thu, 09 Oct 2003 18:08:16 +0200,
Quoted 9 lines · gerlacbd
Hello,
I'm new to ALSA and I have a problem on programming the library:
On my system ALSA library 0.9.7 and ALSA 0.9.7 driver is installed. According to the api-documentation on the ALSA project site, I tried to do something like:
Quoted 7 lines
snd_seq_client_info_t*info;snd_seq_client_info_malloc( &info );snd_seq_get_client_info( seq_handle, info );... do sth. like readout name with
snd_seq_client_info_get_name( info );
snd_seq_client_info_free( info );
it looks ok.
Quoted 6 lines
When compiling/linking, I receive:
"undefined reference to `snd_seq_client_info_malloc'"
Same forsnd_seq_client_info_get_nameand forsnd_seq_client_info_free.What's wrong? Is'nt my lib up to date? (I read that the sequencer api has been rewritten with get/set functions, but in which version?)
how do you link libasound?
Takashi
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
Unfortunatly I forget to mention that the functions listed in the documentation which is linked to on Takashi's page (section "Documents on Alsa") seem to work, eg. snd_card_get_name, snd_seq_open and so on. That is the old api, isn't it?
Quoted 8 lines · Takashi Iwai
Quoted 5 lines
When compiling/linking, I receive:
"undefined reference to `snd_seq_client_info_malloc'"
Same forsnd_seq_client_info_get_nameand forsnd_seq_client_info_free.What's wrong? Is'nt my lib up to date? (I read that the sequencer api has been rewritten with get/set functions, but in which version?)
how do you link libasound?
The compiler options are -Wl,-Bdynamic -lasound.
ldd says (when commenting out the not working function calls and compiling) that libasound.so.2 was linked.
Bernhard
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
At Fri, 10 Oct 2003 09:25:21 +0200,
Quoted 6 lines · Bernhard Gerlach
Unfortunatly I forget to mention that the functions listed in the documentation which is linked to on Takashi's page (section "Documents on Alsa") seem to work, eg.
snd_card_get_name,snd_seq_openand so on. That is the old api, isn't it?
ehm, yeah, most likely. i'm not sure which page you are referring to, but i've not updated my web pages since long time...
Quoted 12 lines
Quoted 8 lines · Takashi Iwai
Quoted 6 lines
When compiling/linking, I receive:
"undefined reference to `snd_seq_client_info_malloc'"
Same forsnd_seq_client_info_get_nameand forsnd_seq_client_info_free.What's wrong? Is'nt my lib up to date? (I read that the sequencer api has been rewritten with get/set functions, but in which version?)
Quoted 5 lines
Quoted 1 line
how do you link libasound?
The compiler options are -Wl,-Bdynamic -lasound.
ldd says (when commenting out the not working function calls and compiling) that libasound.so.2 was linked.
then, no idea.
it'd be better to show your whole code then.
ciao,
Takashi
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
Hello,
I found the mistake. The problem was our complicated project/makefile structure. We were using the 0.9.7 ALSA-Libs on our systems and we are using the header files of the 0.9.7 ALSA-Api. Anyway, we were linking against an old ALSA-lib (maybe a 0.9.0 version). After a change in the project tree, everything (old and new api) works great now.
However, thank you very much for your efforts!!
Thanks,
Bernhard
Signature · 17 lines
--------------------------------- Bernhard Gerlach Fraunhofer AEMT Am Helmholtzring 1 (Haus M) 98693 Ilmenau Germany mail: [email protected] --------------------------------- ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php