This is not how you do the #ifdef __cplusplus
/extern "C"
thing. It's supposed to look like this:
#ifdef __cplusplus
extern "C" {
#endif
int cloneList_size(void);
...
t_collision* ColList(int nbr);
#ifdef __cplusplus
}
#endif
In your version, a C compiler does not see any of the function declarations because you forgot to add another #endif
and another #ifdef __cplusplus
around them. For a C compiler __cplusplus
is not defined. But it still needs to see the function declarations -- just without the extern "C"
block around them.