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 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 /message/393752# 393752 https://communities.intel.com/message/393752# 393752.
also need to note that a debian image must have Kernel drivers for Galileo Gen1 board to control pins.
Kernel drivers are required for MRAA.
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:
# include "mraa.hpp"
# 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?
It seems that your problem does not related with MRAA.
Have you tried to change this line
like shown below?
What is Eclipse message in this case?
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 [/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
Have you added the SDL library in linker options?
https://www.eclipse.org/forums/index.php/t/238028/ Eclipse Community Forums: C / C++ IDE (CDT) " How do I include easily new libraries
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".