Quantcast
Channel: Intel Communities: Message List
Viewing all articles
Browse latest Browse all 20984

multiple definition of mraa problem

$
0
0

I ran into a issue while using mraa today.

I am using IoT with Eclipse on the Edison dev board.

 

I have 2 source files.

Myapp.cpp

SPI_control.cpp

 

Myapp.cpp is where main() is at. So i added #include "mraa.hpp" so that i can set up some I/O pins there right away.

In main(), i want to communicate with a SPI device, I like to have a x.cpp for each device i deal with to keep things clean and know where to find them.

Thus i created the SPI_control.cpp file to handle all the SPI stuff for me.

In main() i call one of SPI_control.cpp functions like Init_LCD();

However if i then #include "mraa.hpp" in this file an compile i get an error of "multiple definition of mraa..."

 

We should be able to #include "mraa.hpp" in any file that needs to use the mraa lib. Why is this happening ?


Viewing all articles
Browse latest Browse all 20984

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>