As other answers have mentioned, this is likely becuase of C++ name mangling. If you want the symbol to be accessible by it's 'unmangled' name, and it's implemented in C++, you'll need to us extern "C"
to tell the C++ compiler that it has a C linkage.
In the header that has the function prototype, you'll want something like:
#if defined(__cplusplus)
extern "C" {
#endif
// the prototype for start()...
#if defined(__cplusplus)
}
#endif
This will ensure that if the function is used by a C++ compiler, it'll get the extern "C"
on the declaration, and that if it's used by a C module, it won't be confused by the extern "C"
specifier.
You implementation in the .cpp file doesn't need that stuff if you include the header before the function definition. It'll use the linkage specification it saw from the previous declaration. However, I prefer to still decorate the function definition with extern "C"
just to ensure that everything is in sync (note that in the .cpp file you don't need the #ifdef
preprocessing stuff - it'll always be compiled as C++.
extern "C"
does not mean that functions cannot pass by reference. – Sestina