ermm... you have C code compiled with the C++ compiler...
You have 2 alternatives :
- compile with gcc in place of g++
- surround each declaration of your C functions by
#ifdef __cplusplus
extern "C" {
#endif
/* your declarations here */
#ifdef __cplusplus
}
#endif