2 Replies Latest reply on Mar 23, 2015 12:28 PM by ForumMigrationAdmin

    Compiling C using mraa on Edison

    ForumMigrationAdmin

      The iotdk-ide-win SDK(Eclipse) works great on my Windows machine to compile, upload and run programs on my Edison.  And of course, I can run the compiled executable directly on the Edison from its command line, too.

      But I am not able to compile C programs using mraa references directly on the Edison. I get this error:

      /tmp/ccqxH6Mw.o: In function `main':
      analog_input.c:(.text+0x18): undefined reference to `mraa_aio_init'
      analog_input.c:(.text+0x28): undefined reference to `mraa_aio_read'
      collect2: error: ld returned 1 exit status

      I would have expected the compiler to error on the #include "mraa.h" line if that was the problem.

      I can compile other C programs on the Edison using gcc.

      Any help?