I get the following error from C ++ Builder 2009 linker
Unresolved external '__fastcall System::TObject::NewInstance(System::TMetaClass *)' referenced from XXX.obj?
We have a set of files Delphi ( .pas ) and a set of C ++ Builder files ( .hpp and .obj ), which has been generated from these files .pas .
The set of files is copied to another computer. Both machines have the same version of C ++ Builder 2009 with the same updates (latest: 3 + 4).
When I create a blank VCL application in C ++ Builder on another computer, and includes a single file obj from this collection to the active project, I get the above error at link time.
Strange things about this error:
- This error may not be reproduced on every machine or installation of C ++ Builder (I checked at least 5 of them).
- If you delete the obj file and instead add the corresponding pas file to the project, the error will disappear.
- But if you delete the pas file and include the obj file again, there will be no error.
- None of the pas obj files are modified in the process. That is, if you delete this set of files from the computer and bring them again from the first machine (where they were created), you still will not have an error.
- After you execute this sequence on one specific computer (include / exclude the pas file from the project) - you can no longer get this error on this machine, no matter how hard you try (move files between folders, play with settings , etc.). In fact, I no longer have machines where I can reproduce this error right now :(
I do not see how the situation "after" is different from the situation "before" (after / before turning pas file), so the error is only visible before and after.
The only mention of this error (or a very similar error) on the Internet is this . But there is no solution. There are no spaces or "spaces" ("") in the path.
Am I missing something? Right now it looks like a C ++ Builder bug for me.
PS We cannot use the solution "just include the pas file", since we need to deploy only the .hpp and .obj tags (no .pas ) on certain machines.
source share