What is this mistake? mscorlib_TLB.pas

We have many Delphi projects, when I created them before, I did not see any errors. But recently, I see the following error when creating one of these projects.

D: \ Delphi Projects \ MySetting.pas Fatal: failed to compile the used module 'mscorlib_TLB.pas'

At first I thought that some background process is using this mscorlib_TLB.pas, then I restart my computer and build it again, it still fails and gives the same error above. What is this mscorlib_TLB.pas error?

Thanks!

+4
source share
3 answers

You have imported a COM object, which is a COM Callable Wrapper (CCW) around a managed object (.net). An imported file of type _TLB.pas will (sometimes unnecessarily) have a link to mscorlib_TLB in its uses .

The importer of the Delphi type library is erroneous, and there are syntax errors in the file of the automatically generated TLB file.

Try removing links to mscorlib_TLB on any device that uses it.

If the block really depends on something in mscorelib , you will have to manually fix the syntax errors in the pas 400kB file.

+6
source

If you really need to use the library, you can import it using the Component :: Import Components tool.

0
source

I found mscorlib_TLB next to the COM shell that I created in C # several years ago, MyComWrapper . When I copied MyComWrapper_TLB to another workstation, it was necessary to copy mscorlib_TLB , since it included the type definitions needed for MyComWrapper_TLB .

Re-importing the associated tlb should restore mscorlib_TLB.pas if it cannot be found. It looks like I re-hosted tlb on October 4, 2017.

Here's the prolog that describes the block:

 unit mscorlib_TLB; // ************************************************************************ // // WARNING // ------- // The types declared in this file were generated from data read from a // Type Library. If this type library is explicitly or indirectly (via // another type library referring to this type library) re-imported, or the // 'Refresh' command of the Type Library Editor activated while editing the // Type Library, the contents of this file will be regenerated and all // manual modifications will be lost. // ************************************************************************ // // $Rev: 52393 $ // File generated on 10/4/2017 11:15:21 PM from Type Library described below. // ************************************************************************ // // Type Lib: C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorlib.tlb (2) // LIBID: {BED7F4EA-1A96-11D2-8F08-00A0C9A6186D} // LCID: 0 // Helpfile: // HelpString: mscorlib.dll // DepndLst: // (1) v2.0 stdole, (C:\Windows\SysWow64\stdole2.tlb) // Parent TypeLibrary: // (0) v1.0 MyComWrapper, (C:\source\my-client\client-project\MyComWrapper\bin\x86\Release\MyComWrapper.tlb) 
0
source

Source: https://habr.com/ru/post/1369043/


All Articles