Use lib_xcore_c from c++
Posted: Mon Mar 12, 2018 1:00 pm
I'm attempting to use some functions from lib_xcore_c from a c++ file but get compilation errors (same error on several lines) in xcore_c_chanend.h as:
..
xcore_c_chanend.h:28:3: error: cannot initialize return object of type 'xcore_c_error_t' with an lvalue of type 'unsigned int'
...
on top of these I also get an error:
xccompat.h:196:18: error: redefinition of 'clock' as different kind of symbol
I successfully invoked lib_xcore_c functions from a c file so I assume the above errors appears from the fact that lib_xcore_c is compiled through the c++ compiler.
I attempted to create a Makefile for lib_xcore_c and link it to my c++ file as binary lib but I can't make this work either.
Anyone has a workaround or suggestion on this?
..
xcore_c_chanend.h:28:3: error: cannot initialize return object of type 'xcore_c_error_t' with an lvalue of type 'unsigned int'
...
on top of these I also get an error:
xccompat.h:196:18: error: redefinition of 'clock' as different kind of symbol
I successfully invoked lib_xcore_c functions from a c file so I assume the above errors appears from the fact that lib_xcore_c is compiled through the c++ compiler.
I attempted to create a Makefile for lib_xcore_c and link it to my c++ file as binary lib but I can't make this work either.
Anyone has a workaround or suggestion on this?