Problem with "undefined reference to"
Hi David,
The problem here is that the math_helper.c file is a C program and your main.cpp is obviously a C++ program. You must slightly modify the math_helper.h file so that it declares its functions correctly to be called from C++: You should add, just after line 47 in math_helper.h:#ifdef __cplusplus extern "C" { #endifand just before the final
#endif
#ifdef __cplusplus } #endif
so that your functions are properly declared as C functions when math_helper.h is included in main.cpp.
Hope this helps,
Bernard (Ac6)