gpt4 book ai didi

c++builder - 在 RAD Studio XE8 中编译时出现 "Unable to perform link"错误

转载 作者:行者123 更新时间:2023-12-02 01:30:21 24 4
gpt4 key购买 nike

即使我以管理员身份运行 IDE,编译器也会给我一个错误(如图所示)。谁能帮忙解决问题?

Rad Studio XE8 error

最佳答案

您的链接器正在尝试分配 128 MB 的内存。 Embarcadero 的以下信息最近发布在 Embarcadero 论坛上:

Error detected (LME288) in Seattle 10 update 1

The error is an "out of memory", error. The reason for "Out Of Memory" errors (which come in different guises) in the linker, is that the linker has to pre-allocate memory in contiguous heaps that it then uses as it links, in the past these heaps could not be adjusted, we had to do a best guess, so in the new 64-bit linker (and has also been added to the 32-bit linker) we allowed people to be able adjust the size of these heaps manually when they needed to. Now the reason why these heaps can be problem is that not all systems are the same, some people use different software that map DLLs into the linker's address space like Windows Hook DLLs, antivirus software all these DLLs allocate memory INSIDE the linker's (any application really) address space and hence has an impact on the size of the heaps the linker can allocate. So we added this ability to adjust the heaps manually, but we also allocated the initial heaps quite big .

The 32bit linker has a new switch -GH, see below this is similar to the ilink64 switch.

The syntax for the switch is:

-GH= "

This option -GH exists from XE3 Update 1 onwards but evidently is not documented?

To see which heap is out of memory you can try from command line.

MSBuild /p:Platform=Win32 /v:diag XXXX.cbproj

This provides additional information such as:

Overrun on linker heap: code

Linker Heaps


info 0x002d0000 0x0a000000

code 0x000d0000 0x00100000

data 0x00030000 0x08000000

bss 0x08000000 0x08000000

Fatal: Out of memory

The left side of the above output is number of bytes being used at the moment and on the right the number of bytes allocated for the specific named heap.

The default heap sizes the linker allocates at start up are:

"system", default size 0x08000000
"info", default size 0x0A000000
"code", default size 0x08000000
"rodata", default size 0x06000000 //readonly data
"data", default size 0x08000000
"bss", default size 0x08000000
"tds", default size 0x0FA00000

When you see the "unknown heap" this is normally the "tds" heap

Example to adjust tds heap from 0x0FA00000 to 0x0A000000 you would do -GHtds=0x0A000000

Hopefully this information helps you and others with the LME288 error.

您可以在项目选项中为链接器指定额外的标志,例如 -GH

关于c++builder - 在 RAD Studio XE8 中编译时出现 "Unable to perform link"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34615831/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com