title: Why does not gcc give me warning or error?
body: <p>I created shared library:</p>
  
  <p>lib.h:</p>
  
  <pre><code>int fun( int a, int b);
  </code></pre>
  
  <p>lib.cpp:</p>
  
  <pre><code>#include &lt;lib.h&gt;
  
  int fun ( int a, int b)
  {
      return a+b;
  }
  </code></pre>
  
  <p>Compile it:</p>
  
  <p><code>gcc -fPIC -c lib.cpp 
  gcc -shared -o -I ./header lib.so lib.o
  </code></p>
  
  <p>My lib.h is located in ./header.
  So , compilation have been successuful. After it I change lib.cpp:</p>
  
  <pre><code>#include &lt;lib.h&gt;
  
  int fun ( int a)
  {
      return a;
  }
  </code></pre>
  
  <p>But nothing  occured. I wanted to see error message or maybe warning. Why is it?</p>