you're right, you must declare the function name with an underscore.
I think the error is in the compiled c object.
If you've compiled with the c++ extension of your compiler, the function name is modified in the obj. The reason is that C++ can handle multiple use of a function name if the functions have different arguments.
So in the compiled obj, the symbol is not _function_name, but _function_name@argument_type. The linker can not handle this modification.
To ensure that this is this problem in your case, you can use the objdump utility to see which symbols are exported by an obj file.
To avoid this problem in your c code, you must add :
#ifdef _cplusplus extern "C" { #endif
//
|