xHb error - does anyone know what this means

Post Reply
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

xHb error - does anyone know what this means

Post 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.
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: xHb error - does anyone know what this means

Post by Antonio Linares »

Tim,

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

Antonio Linares
www.fivetechsoft.com
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: xHb error - does anyone know what this means

Post by TimStone »

I erased the whole folder but that didn't help.
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: xHb error - does anyone know what this means

Post 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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: xHb error - does anyone know what this means

Post 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.
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: xHb error - does anyone know what this means

Post 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.
Regards

G. N. Rao.
Hyderabad, India
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: xHb error - does anyone know what this means

Post 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 ....
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
Massimo Linossi
Posts: 474
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: xHb error - does anyone know what this means

Post 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
Wanderson
Posts: 332
Joined: Thu Nov 17, 2005 9:11 pm

Re: xHb error - does anyone know what this means

Post by Wanderson »

Hello, try to Split your resource files in 2 or more.
User avatar
Massimo Linossi
Posts: 474
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: xHb error - does anyone know what this means

Post by Massimo Linossi »

Hello.
I don't have resources inside the exe. I use one external DLL.
Thanks
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: xHb error - does anyone know what this means

Post 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
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
Post Reply