Code: Select all
#include <xccompat.h>
#ifndef __XC__
#define movable
#endif
typedef struct
{
unsigned a;
unsigned b;
chanend *movable c;
} MyStruct;
c_functions.c: Error: Type of symbol first_c_function has mismatch with previous definition:
c_functions.c: Error: found: void first_c_function(struct *)
../main.xc: Error: previous: void first_c_function(struct &)
../xc_functions.xc: Error: Type of symbol second_xc_function has mismatch with previous definition:
../xc_functions.xc: Error: found: void second_xc_function(struct &)
c_functions.c: Error: previous: void second_xc_function(struct *)
Please see my attached project showing the compilation errors. In the project, the issue is removed by removing "chanend *movable c;" from MyStruct, but so is the functionality I'm after.
The "Calling between C/C++ and XC" document shows examples of how to perform similar operations, but does not provide much depth.
https://www.xmos.com/download/private/C ... 65A%29.pdf
Is there a way to do what I'm after?