title: How to unmangle exported symbols from C++ in dynamic libraries in Xcode on macOS
body: <p>I've been trying to develop a dynamic library in C++ that can be run-time loaded in an application. I finally got it working, but it's a little ugly. I have a function that takes a pointer to a C++ class as an argument, which looks like this:</p>
  <pre><code>bool registerGrindPlugin( Grind::PluginManager* mgr );
  </code></pre>
  <p>But of course it's being exported as:</p>
  <pre><code>_Z19registerGrindPluginPN5Grind13PluginManagerE
  </code></pre>
  <p>I tried a .c file with a simple function and it exported fine as &quot;registerGrindPlugin&quot;, but of course I can't pass a C++ class as the argument that way.</p>
  <p>So... my question is, is there a way to unmangle or alias the exported symbol so that I don't have to use a monstrosity like Z19registerGrindPluginPN5Grind13PluginManagerE in my dlsym call?</p>
  <p>I did see something about -alias_list as a linker option, but I haven't quite figured out how to use it in Xcode. If that is the solution, can somebody provide some more details on how to use this?</p>