title: Causes for ILINK32 Error: Unresolved external '__fastcall System::TObject::NewInstance(System::TMetaClass *)' referenced from XXX.obj?
body: <p>I am getting the following error from C++ Builder 2009's linker</p>
  
  <pre><code>Unresolved external '__fastcall System::TObject::NewInstance(System::TMetaClass *)' referenced from XXX.obj?
  </code></pre>
  
  <p>We have a set of Delphi files (<code>.pas</code>) and set of C++ Builder files (<code>.hpp</code> and <code>.obj</code>), which was generated from these <code>.pas</code> files.</p>
  
  <p>Set of files is copied to another machine. Both machine has the very same C++ Builder 2009 version with the same updates (latest: 3+4) installed.</p>
  
  <p>When I create an empty VCL application in C++ Builder on other machine and include one obj file from this set to the active project, I get the above mentioned error at linking stage.</p>
  
  <p>The strange things about this error are:</p>
  
  <ol>
  <li>This error can be reproduced not on every machine or C++ Builder installation (I've checked at least 5 of them). </li>
  <li>If you remove obj-file and instead add corresponding pas file to the project - the error will dissappear.</li>
  <li>But if you remove pas-file and include obj-file again - there will be no error. </li>
  <li>None of the obj of pas files gets modified in the process. I.e. if you delete this set of files from the machine and bring them from the first machine again (where they were created) - you still will have no error.</li>
  <li>Once you do that sequence on one particular machine (include/exclude pas-file from the project) - you can not longer get this error on that machine, no matter how hard you try (move files between folders, playing with settings, etc, etc). Actually, I already have no machines, where I can reproduce this error right now :(</li>
  </ol>
  
  <p>I do not see, how situation "after" is different from situation "before" (after/before inclusion of pas-file), so error is visible only before and not after.</p>
  
  <p>The only mention of this error (or a very similar error) on the internet is <a href="http://www.programmersheaven.com/mb/bcbuilder/368431/368431/ilink-errors-in-cppb2007/?S=B10000" rel="nofollow noreferrer">this</a>. But there is no solution. There are no "+" chars in the path nor spaces (" ").</p>
  
  <p>Am I missing something? Right now it looks like C++ Builder bug to me.</p>
  
  <p>P.S. We can not use "just include pas-file" solution, as we need to deploy only <code>.hpp</code> and <code>.obj</code> (no <code>.pas</code> files) to certain machines.</p>