I am trying to do something like the following
enum types {None, Bool, Short, Char, Integer, Double, Long, Ptr};
int main(int argc, char ** args) {
Assuming you're writing the shared libraries; the best solution I've found to this problem is strictly defining and controlling what functions are dynamically linked by:
clang -dynamiclib Person.c -fvisibility=hidden -o libPerson.dylib when compiling with clang__attribute__((visibility("default"))) and extern "C" to selectively unhide and include functionsI found this in Apple's Dynamic Library Design Guidelines. These docs also include other solutions to the problem above was just my favorite.
As stated in previous answers, C and C++ functions with extern "C" in their definition aren't mangled so the function's symbols simply don't include the full function signature. If you're compiling with C++ without extern "C" however functions are mangled so you could demangle them to get the full function's signature (with a tool like demangler.com or a c++ library). See here for more details on what mangling is.
Generally speaking it's best to use the first option if you're trying to import functions with dlopen.