title: Using C/C++ static libraries from iPhone ObjectiveC Apps
body: <p>Is it possible to have a C static library API, which uses C++ internally and hide this from users of the library?</p>
  
  <p>I have writen a portable C++ library I wish to statically link to an iPhone application.</p>
  
  <p>I have created an Xcode project using the Max OS X 'static library' template, and copied the source across, as well as writing a C wapper (to deal with exceptions) using (extern "C").</p>
  
  <p>I am trying to use the generated library (.a file) in another Cocoa iPhone application.</p>
  
  <p>Everything works well if the I use (.mm) extentions on the calling ObjectiveC file and (.cpp) on the implementation class in the library. </p>
  
  <p>But I get unresolved symbols on linking when I try and change the wrapper file to a (.c) extention, even though all the wrapper function files are only C functions.</p>
  
  <p>Just becuase C++ is used internally in a library, does it mean that externally it still must be treated as a C++ program. Is there not anyway to enforce this abstraction?</p>
  
  <p><strong>Edit:</strong> Thanks for the replies,</p>
  
  <p>I had been using extern "C", I was just unsure about what configurations where needed in the calling project. ie. if the calling projected would require to know if it used C++ or could be ignorant and think its a purely C library.</p>
  
  <p>It would seem I cannot, and I must use (.mm) files on my ObjectiveC classes.</p>