This message was posted on behalf of Intel Corporation1 of 1 people found this helpful
If you are not using Yocto, you should build MRAA by following the instructions found in http://iotdk.intel.com/docs/master/mraa/building.html. If you were using Yocto it would be a lot simpler, you could simply set up the repo and download the packages as I explain in https://communities.intel.com/message/393752#393752.
Well, I'm going to use Yocto but the problem with it is that I can't use SDL API. Because I need to use Sound Card's ADC and I have problem with Alsa. For example, in Intel System Studio Iot I wrote:
#define PCM_DEVICE "default"
unsigned int val, val2;
/* Open PCM device for playback. */
rc = snd_pcm_open(&handle, "default",
if you see, I included asoundlib.h correctly because I have not problem with the sentences:
But the ide give me the next message to the sentence:
where Eclipse trhows: undefined reference to snd_pcm_open();
I went in Galileo with ssh, and I checks /usr/include/alsa an is all .h necesary and it's included in asoundlib.h as you can see in asounlib.h
then I go to pcm.h And there is defined snd_pcm_open()
Why can I do? Can I install SDL in Yocto? How?
I sent this question to email@example.com and she sent this information to Brendan (that's what she said, sayin he is the mraa expert)
This message was posted on behalf of Intel Corporation
I agree with @xbolshe and you can also try to install SDL from source from https://www.libsdl.org/download-2.0.php. You can see their documentation in http://wiki.libsdl.org/FrontPage including how to install it (http://wiki.libsdl.org/Installation).
And in case you have issues installing this package you can contact them in http://forums.libsdl.org/.
I did the change to [code]#include <alsa/asoundlib.h> [/code] but it still don't work.
[quote]What is Eclipse message in this case?[/quote]
undefined reference to snd_pcm_open()
That's the eclipse message but as I said, the library is correctly included because there is not problem with the definition of [code]snd_pcm_t *handle[/code] and snd_pcm_t is a variable types defined in asoundlib.h
1 of 1 people found this helpful
Have you added the SDL library in linker options?
It may be a problem with libSDL, so you may try to add libasound.
"i586-poky-linux" has no libSDL
"quark-wrs-linux" has libSDL
It is strange. I use "iss-iot-win_03-24-16.7z".