FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xHb error - does anyone know what this means
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
xHb error - does anyone know what this means
Posted: Thu May 21, 2015 03:10 PM

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
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: xHb error - does anyone know what this means
Posted: Thu May 21, 2015 07:30 PM

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
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: xHb error - does anyone know what this means
Posted: Thu May 21, 2015 08:10 PM

I erased the whole folder but that didn't help.

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: xHb error - does anyone know what this means
Posted: Fri May 22, 2015 07:46 AM

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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xHb error - does anyone know what this means
Posted: Fri May 22, 2015 03:31 PM
Regards



G. N. Rao.

Hyderabad, India
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: xHb error - does anyone know what this means
Posted: Fri May 22, 2015 06:13 PM

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
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xHb error - does anyone know what this means
Posted: Fri May 22, 2015 09:53 PM
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
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: xHb error - does anyone know what this means
Posted: Fri May 22, 2015 11:41 PM

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
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 512
Joined: Mon Oct 17, 2005 10:38 AM
Re: xHb error - does anyone know what this means
Posted: Wed May 25, 2016 11:14 AM

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

Posts: 332
Joined: Thu Nov 17, 2005 09:11 PM
Re: xHb error - does anyone know what this means
Posted: Wed May 25, 2016 12:39 PM

Hello, try to Split your resource files in 2 or more.

Posts: 512
Joined: Mon Oct 17, 2005 10:38 AM
Re: xHb error - does anyone know what this means
Posted: Wed May 25, 2016 02:40 PM

Hello.
I don't have resources inside the exe. I use one external DLL.
Thanks

Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: xHb error - does anyone know what this means
Posted: Wed May 25, 2016 04:31 PM

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
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit

Continue the discussion