inline function -- "unresolved external" error?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/3540931/inline-functions-in-c">Inline functions in C++</a>  </p>
</blockquote>



<p><code>#foo.cpp</code></p>

<pre><code>void func1(){
...
}

inline void func2(){
...
}
</code></pre>

<p><code>#boo.cpp</code></p>

<pre><code>void func3{    
   func1();
   func2();
}
</code></pre>

<p>for <code>func1</code>, we say that after everything has been compiled, linker uses the address of func1 to make a call to it. For <code>func2</code>, as it is inline and defined in <code>foo.cpp</code>, compiler will not get the it's definition to replace <code>func2</code> call but inline functions also have addresses then why can't linker use this address of <code>func2</code> to link its call and gives the error of unresolved external?</p>
