0

I'm using Embarcadero C++ Builder 10.1 Berlin Update 2.

I added one file to a project. I tried to build said project and the build failed and reported the following error: [bcc32 Fatal Error] FileName.cpp(44329): F1008 Out of memory

I have been reading up on errors that can be found via Google and am only finding linker errors. My understanding is that this isn't a linker error as I'm not seeing [ilink32]. I haven't come across any examples of this error.

The file I added has 25 lines in the h file and 64865 lines in the cpp file. The following method takes up 64755 lines of the cpp file.

void __fastcall TFileName::PopulateKeyValueList()
{
    SOKeyValueList->Clear();
    SOKeyValueList->AddPair("AKey","AValue");
    ... roughly 64750 more lines like the one above adding pairs to the list
}

This wasn't an issue before I added the file containing 65k lines of code to the project so I believe the appropriate question is, how may I resolve a file containing 65k lines of code causing a [bss32 Fatal Error] F1008 Out of memory error?

4

1 回答 1

1

将数据(尤其是在您的情况下如此多的数据)硬编码到源文件中通常不是一个好主意。您应该将键值对信息放在一个文件中并读出它们以构建键值列表。

对于该错误,我猜您使用的编译器不足以处理大型源文件。

于 2017-11-21T20:48:15.993 回答