title: Undefined symbols for architecture arm64. Make C calls into ObjC++ file?
body: <p>I'm getting this Apple Mach-O linker error:</p>
  
  <pre><code>Undefined symbols for architecture arm64:
    "_TestFunction", referenced from:
        -[ViewController viewDidLoad] in ViewController.o
  ld: symbol(s) not found for architecture arm64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  </code></pre>
  
  <p>Here's all the steps necessary to reproduce the error:</p>
  
  <ol>
  <li>I created a new single view universal Objective C project (Xcode Version 6.0.1 (6A317))).</li>
  <li>I then created a new ObjectiveC file called TestClass</li>
  <li>Change TestClass.m to TestClass.mm</li>
  <li>Add "<code>void TestFunction();</code>" to my .h</li>
  <li>Add "<code>void TestFunction(){}</code>" to my .mm</li>
  <li>Import <code>TestClass.h</code> into my <code>ViewController.m</code> and try and call <code>TestFunction()</code> from my viewDidLoad.</li>
  </ol>
  
  <p>I'm doing some Core-Audio work and need to make some C++ calls in my MIDI callbacks, so I can't make any ObjectiveC method calls as they'd block the audio thread.</p>
  
  <p>Maybe Xcode view TestFunction() as a C++ call, so won't make it from a pure ObjectiveC class?  Is there any way of telling Xcode that it's a C function?</p>