Page 1 of 1

xHb error - does anyone know what this means

PostPosted: Thu May 21, 2015 3:10 pm
by TimStone
I have two projects. #1 is larger, #2 is similar but with optimized coding so it is smaller.

Using xHb, with xBuildw, #1 builds without any problems. Using all of the same .lib and resource files, #2 gets the following error when linking:

xLINK: fatal error: Internal error: write_executable_image.

There are no errors in the compile, and the libraries linked in are identical.

Can anyone give me any ideas on what this error actually means. I asked yesterday on the xHarbour(.com) site, but no answers yet.

Also, it might be helpful to note that the actual .prg files can be built into an .exe using FWH, Harbour, and Visual Studio 2013 without error, and it runs fine. However, I also need an xHarbour build for some unique libraries.

Thanks for your ideas.

Re: xHb error - does anyone know what this means

PostPosted: Thu May 21, 2015 7:30 pm
by Antonio Linares
Tim,

Try to erase all temporary files that you may have in the folder where you are building the EXE

Re: xHb error - does anyone know what this means

PostPosted: Thu May 21, 2015 8:10 pm
by TimStone
I erased the whole folder but that didn't help.

Re: xHb error - does anyone know what this means

PostPosted: Fri May 22, 2015 7:46 am
by Antonio Linares
Tim,

It seems as a xLINK bug manisfested by the size of the app.

Try to reorganize your PRGs so the size of your OBJs changes and maybe that avoids the error.

If not, then you have to ask xhb.com

Re: xHb error - does anyone know what this means

PostPosted: Fri May 22, 2015 3:31 pm
by nageswaragunupudi

Re: xHb error - does anyone know what this means

PostPosted: Fri May 22, 2015 6:13 pm
by TimStone
These suggest a possible ceiling of 64 MB.

If I build using a link script withing UE Studio, the .exe is 41 MB. If I build using Visual Studio 2013, the .exe is under 10 MB. Same exact code and specified libraries.

Is there an xHarbour flag that has this only link elements from the .lib files that are actually used ? Is their also one for the Windows Linker ? The .lib files provided to the linker are exactly the same, as are the .prg files. There is apparently a flag in Visual Studio that makes the size much smaller.

It's just one of those weeks ... challenging.

Re: xHb error - does anyone know what this means

PostPosted: Fri May 22, 2015 9:53 pm
by nageswaragunupudi
xhb.com's linker is Pelles C linker.
Hope the resources are all compiled by xhb's xrc.exe

If I build using a link script withing UE Studio, the .exe is 41 MB. If I build using Visual Studio 2013, the .exe is under 10 MB. Same exact code and specified libraries.

Surprising. The problem must be with the linkscript.

Re: xHb error - does anyone know what this means

PostPosted: Fri May 22, 2015 11:41 pm
by TimStone
Surprise ... it's not that simple ...

Three compiler / linker combinations:

1) xHb.com ( Pelles )
2) Ultra Edit Studio
3) Visual Studio 2013

The source code is all the same ( in the exact same folder )
The called libraries are the same

Now, try to find the actual MakeFile for each one.

# 1 gets an error and won't build
# 2 now can't seem to write to the disk now when running the Harbour compiler ( so it doesn't get to the linking stage ).
# 3 Works fine and gives a build size of about 42 MB.

Not my idea of a fun day ....

Re: xHb error - does anyone know what this means

PostPosted: Wed May 25, 2016 11:14 am
by Massimo Linossi
Hello Tim
Have you found a solution for this error ?
I have the same problem. At the end of the build process I have this message :

xLINK: fatal error: Internal error: write_executable_image.

Thanks a lot
Massimo

Re: xHb error - does anyone know what this means

PostPosted: Wed May 25, 2016 12:39 pm
by Wanderson
Hello, try to Split your resource files in 2 or more.

Re: xHb error - does anyone know what this means

PostPosted: Wed May 25, 2016 2:40 pm
by Massimo Linossi
Hello.
I don't have resources inside the exe. I use one external DLL.
Thanks

Re: xHb error - does anyone know what this means

PostPosted: Wed May 25, 2016 4:31 pm
by TimStone
That was a year ago, and I found an answer ... but can't remember what it was !
I now have everything working fine.

Thinking back, I believe I was linking in an extra file that made the build size far too large. I removed that and the build size was OK.

If I can locate that I will post what I found