1

I am converting a large project from Borland C++ Builder 6 to Embarcadero C++ Builder 10.2.3 and get the error

[ilink32 Error] Fatal: Unable to open file 'FORMS.OBJ'

When I'm converting. I created a new project then added all the original source files to the new project and converted all form related includes to the new vcl includes. As far as I can tell "FORMS.OBJ" is not referenced anywhere in the source code. I'm looking for any ideas on what to try or look for next.

CoyBit
  • 1,592
  • 1
  • 17
  • 19
T.Mineo
  • 21
  • 1
  • 5

2 Answers2

1

A library file was not updated and was looking for FORMS.OBJ. When the file was removed and all references to the library were removed, there were no more linker errors.

T.Mineo
  • 21
  • 1
  • 5
  • yep that is common rookie mistake like deleting event body .... in a builder IDE you delete just the code (leave header and brackets `{}` ) and save the project IDE will auto delete all references to empty VCL style functions/events and than also the function/event whatever too. If you do it manually you got your problem and need to delete all the underlying stuff on your own ... – Spektre Mar 29 '18 at 06:21
  • 1
    @Spektre: Can you explain further? I'm getting a link error for ALIASREC.obj and if I check the contents of every file on my computer there is no mention of ALIASREC. I have moved a C++ Builder 2010 project to C++ Builder 10.3.2, created new projects and added .h and .cpp files. – inquam Oct 11 '19 at 12:18
  • @inquam Google search [hints its a new IDE related bug](http://www.devsuperpage.com/search/Articles.aspx?G=2&ArtID=109896) ... delete all temp files in your project (tds,obj,exe,...) and compile again ... it happens time to time in BCB for ages but each IDE throws different errors/behavior ... do not worry MSVCPP and GCC are the same (at least on platforms I use) if not worse – Spektre Oct 11 '19 at 12:34
  • @Spektre I have tried cleaning everything. Doing a "grep -riI aliasrec" on the entire project folder returns nothing. Even doing it on the entire install folder of RAD Studio 10.3.2 returns nothing. I'm guessing there might be some compiled file with the reference somewhere that is keeping me from finding it with a search. – inquam Oct 11 '19 at 12:41
  • @inquam my guess its a part of VCL (or FMX) those libs are linking on itself sometimes clean/build helps sometimes moveing the `#pragma hdrstop` etc ... PS if you use custom BPLs you need to clean them too in their folders ... also close the IDE before the manual clean ... – Spektre Oct 11 '19 at 13:10
  • @Spektre: I think I managed to clean most of it and have gotten a few projects like this going now. Even though the compile folder was different it seemed it picked up old stray .obj files etc during the compilation that could mess it up. So I removed any trace of .#00, .map, .pch, .svlDbgHelpSymbols, .tds, .obj files. Have another strange thing still though. Some projects complain about a design time component I have in a bpl. If I add a second one to the form then it compiles fine :P – inquam Oct 11 '19 at 14:54
  • 1
    @inquam yes those errors where common from BCB6 and newer... it also sometimes help to manually add #include to the VCL h file containing the component that its complaining about which one you need to find on your own ... I usually search the VCL header files with text search in total commander in such case. This usually happens with older components (from win 3.X times) like page tabs or sometimes even file explorers ... However I found out this mess is more often occur if you got many warnings in your project and or too much code mine are 5-10 MByte of code and I have this bug ~2 per year – Spektre Oct 11 '19 at 15:00
0

I find RAD Studio muuuch stable when working under Delphi personality compared with the C++ personality.

How to fix the problem mentioned above: make sure the FrameworkType is set to VCL instead of None. I have found mine set to "none":

<FrameworkType>VCL</FrameworkType>   

Then I have seen that the IDE tend to f***** also this entry:

<AppType>Package</AppType>

The last bug. The IDE forgot to add this entry:

    <PackageImport Include="vcl.bpi">
        <BuildOrder>4</BuildOrder>
    </PackageImport>

Locate the PackageImport Include="rtl.bpi" entry and put it under it.
Delete "Win32", restart the IDE and rebuild (also, use 2-3 drops of holly water if necessary). After this the IDE should not complain anymore.

Gabriel
  • 20,797
  • 27
  • 159
  • 293