linking error in Visual c++ when trying to inline functions
<p>When trying to inline a function in Visual C++ (2008 express), I got a linking error, after a close inspection of the code, what I discovered is that the function I am trying to inline throws an exception... if I remove the exception throwing, the linking error goes away, can someone explain why it is the case?</p>

<pre><code>int com_ximpleware::FastIntBuffer::intAt(int index){
    if (index &lt; 0 || index &gt; size - 1) {
       throw InvalidArgumentException("invalid index range in FastIntBuffer's intAt()");
    }
    return ((int *) al-&gt;get(index&gt;&gt;exp))[index &amp; r];
}
</code></pre>

<p>The exaxt error is shown below:</p>

<pre><code>intHash.obj : error LNK2019: unresolved external symbol "public: int __thiscall com_ximpleware::FastIntBuffer::intAt(int)" (?intAt@FastIntBuffer@com_ximpleware@@QAEHH@Z) referenced in function __catch$?isUnique@IntHash@com_ximpleware@@QAE_NH@Z$0
1&gt;C:\new_cvs\cpp_test1\Debug\cpp_test1.exe : fatal error LNK1120: 1 unresolved externals
</code></pre>

<p>One more thing, this function was invoked else normally, the calling part of the funtion wasn't included.</p>
