title: Prevent library user from overriding my function
body: <p>I have create dynamic library in which I define a function. I use this function internally in my own library and dont expose via headers. But if user of my library defines similar function then that function overrides my function and breaks my lib.</p>
  <p>Here is an example:</p>
  <p>libmylib.so:</p>
  <pre class="lang-c prettyprint-override"><code>#include &lt;stdio.h&gt;
  
  void hello() {
      puts(&quot;hello form t.c&quot;);
  }
  
  void hello1() {
      hello();
  }
  </code></pre>
  <p>a.out:</p>
  <pre class="lang-c prettyprint-override"><code>#include &lt;stdio.h&gt;
  
  void hello1();
  
  void hello() {
      puts(&quot;hello from main.c&quot;);
  }
  
  int main() {
      hello();
      hello1();
  }
  </code></pre>
  <p>Output I get:</p>
  <pre><code>hello from main.c
  hello from main.c
  </code></pre>