VO error: Link failed!

Public support forum for peer to peer support with related to the Visual Objects and Vulcan.NET products
Post Reply
ic2
Posts: 1798
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

VO error: Link failed!

Post by ic2 »

This is a VO error I have quite often. The only thing which helps is leaving VO and restarting it. As this only takes a few seconds I usually don't care too much but I wonder if there's a way to prevent it:

Link failed!
Error in function LnkCreateView: Can't create file mapping for (....exe)

Causes are disk space, read access to cavo, exe not freed or repo not up to date

None are applicable. I e.g. regularly create a new repo in which I import a full export of AEF's from the previous repo.

Dick
User avatar
robert
Posts: 4225
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

VO error: Link failed!

Post by robert »

Dick,

This is usually an indication that Linker cannot allocate a contiguous block of memory for one of the sections in the exe file.
Did you change any of the values in the linker settings in either the project settings dialog or the default settings dialog.
You can either check the dialogs, or look for the VOLINK section in cavo28.cfg or your project file (voprj file in the repo folder)

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
ic2
Posts: 1798
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

VO error: Link failed!

Post by ic2 »

Hello Robert,

Below what I have in that section; can't remember if I changed it and when but I'd say: not for years.

Can you see anything which should have a different value?

Dick

[VOLink]
MAP=0
ReleaseBuild=0
StackSize=0x800000
BinarySize=0xC000000
ExeAtomTabSize=0x4000000
TempAtomTabSize=0x4000000
edata=0x400000
idata=0x400000
reloc=0x800000
rsrc=0x2000000
text=0xE000000
data=0x4000000
User avatar
robert
Posts: 4225
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

VO error: Link failed!

Post by robert »

Dick,

You must have changed these numbers. They are quite big:
BinarySize: 0xC000000 = 200Mb binary size.
ExeAtomTableSize: 0x4000000 = 64 Mb of Symbols in the symbol table
Text section: 0xE000000 = 230 Mb.

An exe produced with VO contains a couple of sections:
.text = the assembly code
. data = data
. idata = import table for code in other DLLs
. edata = export table for exported functions and data
. rsrc = resources (menu, form, images, string tables etc)
. symbol table

All of these together should not be bigger than the Binary Size.
Of course for some app you will have more code, for others more data, resources or symbols.
But it really does not make sense to have one of these bigger than the binary size.

I suggest you comment out all of this section and try to link again. I would not be surprised if it then just works.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
Otto
Posts: 174
Joined: Wed Sep 30, 2015 6:22 pm

VO error: Link failed!

Post by Otto »

Robert,

We also struggle with these settings.

I have seen that the default settings don't work for us. Am I correct that I can inspect the size of the sections in the exe and set the values in de VOLINK to those values + 20% ?

I used 'PE internals' just now and got (some of) the values. Not tried this yet though.

Bytheway, how is it at MS?

Regards,
Otto
ic2
Posts: 1798
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

VO error: Link failed!

Post by ic2 »

Hello Robert,

I tried this and indeed VO functioned error free. I started a few programs. To my surprise, only this morning it went wrong:

First with:
Maximum size (0x3000000) of section .text exceeded
and after adapting that:

Size of EXE File exceeds maximum size (0x4000000)

As it is difficult to determine which settings needed which values, I restored the section and brought down a few values which I hope are not critical and increased the one of the binary to 0xF000000 . I will have to do some hex adding to see if the total is now <the binary but for now I'll just wait to see if this solves it.

Dick
ic2
Posts: 1798
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

VO error: Link failed!

Post by ic2 »

Hello Robert,

After 2 days with quite some VO programming I can say that I didn't see the problem once. So I guess your remark "All of these together should not be bigger than the Binary Size." seems to have solved the problem as normally I have this a few times a day.

Thank you for sharing your VO knowledge here.

Dick
User avatar
OhioJoe
Posts: 131
Joined: Wed Nov 22, 2017 12:51 pm
Location: United States

VO error: Link failed!

Post by OhioJoe »

I just started getting this error in a pop-up box entitled Visual Objects Linker and am hoping someone can point me in the right direction:

Link Failed!
Error in function LinkWriteExe: Size of EXE File exceeds maximum size. (0x4000000)

then it says:

Common sources for link problems:
- Not enough disk space
- You have only read access to your current directory.
(C:cavo28bin)
- The linker cannot open the executable, since it already exists and has not been freed by the operating system due to a crash or an abort. Try leaving VO and deleting the existing file.
- Your repository index files are not up do date. Close VO, run the Re-index utility for your current project and re-start.

I tried installing VO on three different computers. Same result. I have enough disk space and read/write access to that directory. I've rebooted to free up any system locks, and I've reindexed.

Perhaps this is the programming gods trying to tell me it's time to move from VO once and for all. (I have, in all apps but one,) In any case it would be wonderful for me to resolve this in case I need to revert to VO for some reason.

Here is the VOLink section of my cavo28.cfg file:

[VOLink]
MAP=0
ReleaseBuild=0

Thanks, everyone.
Joe Curran
Ohio USA
User avatar
robert
Posts: 4225
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

VO error: Link failed!

Post by robert »

Joe,
Open the File / Default Settings dialog in VO (to set it globally) or the File / Project Settings dialog (to set it for the current project only)
Choose Linker in the tree and change the value on the right hand side to a higher number. For example change the 4 to a 5 or 6.
You may have to restart VO to activate this.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
OhioJoe
Posts: 131
Joined: Wed Nov 22, 2017 12:51 pm
Location: United States

VO error: Link failed!

Post by OhioJoe »

Ba-da-BING!

That worked.

Thank you, Robert
Joe Curran
Ohio USA
Post Reply