title: Why is extern "C" working only inside the file to be included, not when wrapped around the #include directive
body: <p>I'm including a C file called "AniUtils.h" in an Objective C++ class. I understand that I need to use 'extern "C"' if I'm going to include a C file in a C++ file. What's confusing me is that wrapping the include directive in an extern C doesn't seem to work, while putting extern C in the body of the file does.</p>
  
  <p>So, wrapping the include directive doesn't work.</p>
  
  <pre><code>extern "C" {
      #include "AniUtils.h"
  }
  </code></pre>
  
  <p>However, doing it this way works fine:</p>
  
  <pre><code>// AniUtils.h
  #ifdef __cplusplus
  extern "C" {
  #endif
  
  // body of included file
  
  #ifdef __cplusplus
  }
  #endif
  </code></pre>
  
  <p>Why does the second approach work but not the first?</p>