1 Reply Latest reply on Mar 23, 2015 11:50 AM by ForumMigrationAdmin

    MRAA common.hpp linker multiple definition error


      I'm building a simple project including mraa.hpp in two source files, and getting a linker error for redefinition of the global functions declared (and implemented) in common.hpp, ex:

      common.hpp:48: multiple definition of `mraa::getVersion()'

      Looking at common.hpp, its a header file which implements several global functions in the mraa namespace. Is there a way to include this header file in multiple source files without redefining the method & causing linker errors? Is there a reason they are in the header and not the library? Should the compiler be inlining them?