Problem to compile : Undefined reference
Hi,
I want to develop some applications (VUmeter and Peakmeter) with ALSA-API. So, I tried to compile an example from
http://equalarea.com/paul/alsa-audio.html#playex but I have some errors like : "example.o(.text+0x30c): In function `main':
: undefined reference to snd_strerror' example.o(.text+0x340): In function main':
: undefined reference to `snd_pcm_close'
[..]"
Do you have an idea where these errors come from ?
Thank you
Signature · 7 lines
Ker ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
That would indicate that you are not linking against libasound
does your compile statement include the line
-lasound, ie:
gcc -o myapp myapp.c -lasound
-----Original Message-----
From: [email protected] on behalf of Nyx
Sent: Wed 2/28/2007 6:03 AM
To: alsa-devel
Subject: [Alsa-devel] Problem to compile : Undefined reference
Hi,
I want to develop some applications (VUmeter and Peakmeter) with ALSA-API. So, I tried to compile an example from
http://equalarea.com/paul/alsa-audio.html#playex but I have some errors like : "example.o(.text+0x30c): In function `main':
: undefined reference to snd_strerror' example.o(.text+0x340): In function main':
: undefined reference to `snd_pcm_close'
[..]"
Do you have an idea where these errors come from ?
Thank you
Signature · 11 lines
Ker ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Alsa-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/alsa-devel
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel
2007/2/28, Nyx <[email protected]>:
Quoted 11 lines
I want to develop some applications (VUmeter and Peakmeter) with ALSA-API. So, I tried to compile an example from
http://equalarea.com/paul/alsa-audio.html#playex but I have some errors like : "example.o(.text+0x30c): In function `main':
: undefined reference tosnd_strerror' example.o(.text+0x340): In functionmain':
: undefined reference to `snd_pcm_close'
[..]"Do you have an idea where these errors come from ?
You have to link your program with the ALSA library. For instance:
gcc -lasound -Wall -o myprog myprog.c
Of course, ALSA development files must be installed.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Thank you.
It works now...
I work with Code::Block. Which IDE do you use ?
--
Ker
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
sigh;
the reason i/we where able to answer question is because i *dont* let an ide do my thinking for me.
believe me i understand the benefits (i started coding with M$FT QuickBasic and wrote portions of M$FT Platform Builder V3), but i really urge you to actually try using the command line to compile and link stuff, it helps you understand a lot of things.
-----Original Message-----
From: [email protected] on behalf of Nyx
Sent: Thu 3/1/2007 12:52 AM
To: alsa-devel
Subject: Re: [Alsa-devel] Problem to compile : Undefined reference
Thank you.
It works now...
I work with Code::Block. Which IDE do you use ?
--
Ker
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel