On Saturday 07 June 2003 20:17, Jerry Feldman wrote:
Make sure that the prototype for the function you are calling is declared as a C function (as an example):
Ok, so I declare all the C functions as: #if defined __cplusplus extern "C" { m_host_t MSG_host_create(const char* name, char* trace_file, double cpu, void *data); /* other functions... */ } #endif /* __cplusplus */ Now, g++ complains about conflicting declarations the C libary header file (msg.h). What am I supposed to do now? I have the source to the library, is there anything I need to modify (presummably the header files)? ========== ../include/msg.h:40: error: previous declaration of `s_m_host* MSG_host_create(const char*, char*, double, void*)' with C++ linkage Host.cpp:21: error: conflicts with new declaration with C linkage ../include/msg.h:48: error: previous declaration of `MSG_error_t MSG_host_destroy(s_m_host*)' with C++ linkage Host.cpp:24: error: conflicts with new declaration with C linkage Host.cpp:25: error: parse error before `char' ========== -- -- Verdi March --