title: best practice for delivering a C API hiding internal functions
body: <p>I have written a C library which consists in a few .h files and .c files. I compile it as a .a static library. </p>
  
  <p>I would like to expose only certain functions to the user and keep the rest as "obscure" as possible to make reverse engineering reasonably difficult. </p>
  
  <p>Ideally my library would consist of:</p>
  
  <p>1- one .h file with only the functions exposed to the user</p>
  
  <p>2- myLibrary.a: as un-reversengineerable as possible</p>
  
  <p>What are the best practices for that? Where should I look, is there a good tutorial/book somewhere?</p>
  
  <p>More specifically:</p>
  
  <p>for - 1 </p>
  
  <p>I already have all my .h and .c working and I would like to avoid changing them around, moving function declarations from .h to .c and go into circular references potential pbs. Is That possible?</p>
  
  <p>For instance is it a good idea to create a new .h file which I would use only for distributing with my .a? That .h would contain copies of the functions I want to expose and forward declarations of types I use. Is that a good idea?</p>
  
  <p>for - 2 </p>
  
  <p>a) what gcc flags (or xcode) shall I be aware of (for stripping, not having debug symbols etc)
  b) a good pointer to learn about how to do code obfuscation?</p>
  
  <p>Any thought will help,</p>
  
  <p>Thanks, baba</p>