Page 1 of 2
xHarbour vs Harbour
Posted: Mon Dec 08, 2014 7:05 pm
by Enrico Maria Giordano
Why this sample:
Code: Select all
#include "Fivewin.ch"
FUNCTION MAIN()
? "Hello, World!"
RETURN NIL
is 2.566.144 bytes if compiled with xHarbour and 3.016.192 bytes if compiled with Harbour? What is in that size difference?
EMG
Re: xHarbour vs Harbour
Posted: Mon Dec 08, 2014 10:16 pm
by Enrico Maria Giordano
Sorry, I just realized that I already asked this in the past. But I'd really like to know what is in my EXEs...
EMG
Re: xHarbour vs Harbour
Posted: Tue Dec 09, 2014 7:35 am
by Antonio Linares
Enrico,
Harbour is much more mature, robust and complex than xHarbour.
But to check it for yourself, the easiest way would be to generate the MAP files (when you build the EXE using Harbour and xHarbour) and compare them and you will see what is in Harbour that it is not in xHarbour
Re: xHarbour vs Harbour
Posted: Tue Dec 09, 2014 10:00 am
by Enrico Maria Giordano
Antonio,
Antonio Linares wrote:Harbour is much more mature, robust and complex than xHarbour.
No, this is not the cause of the difference. The same sample compiled for console (without FWH) shows: 889.856 bytes with xHarbour and 747.008 bytes with Harbour.
I don't understand...
EMG
Re: xHarbour vs Harbour
Posted: Tue Dec 09, 2014 10:09 am
by hmpaquito
Enrico,
Have you thought raise your doubt in the list of users Harbour?
https://groups.google.com/forum/?fromgr ... bour-users
Regards
Re: xHarbour vs Harbour
Posted: Tue Dec 09, 2014 10:14 am
by Enrico Maria Giordano
No, the problem is with Harbour/FWH not with pure Harbour console.
EMG
Re: xHarbour vs Harbour
Posted: Tue Dec 09, 2014 10:19 am
by Antonio Linares
Enrico,
have you compared the map files ?
That will explain it...
Re: xHarbour vs Harbour
Posted: Tue Dec 09, 2014 10:36 am
by Enrico Maria Giordano
Antonio,
how to generate map file with BCC582? I tried -M but I didn't find any map file in the directory.
EMG
Re: xHarbour vs Harbour
Posted: Tue Dec 09, 2014 11:25 am
by hmpaquito
/m (or -m)
From bcb5tool.hlp:
The following list shows the ILINK32 linker options in alphabetical order.
Option Description
@xxxx Uses the response file xxxx
/A:dd Specifies file alignment (backward compatibility switch; use /Af)
/Af:nnnn Specifies file alignment; set nnnn in hex or decimal (0x200 = 512 byte boundaries)
/Ao:nnnn Specifies object alignment; set nnnn in hex or decimal (0x1000 = 4096 byte boundaries)
/aa Builds a 32-bit Windows application
/ad Builds a 32-bit Windows device driver
/ap Builds a 32-bit Windows console application
/B:xxxx Specifies image base address
/b:xxxx Specifies image base address; preserves DLL relocation table
/C Erases all linker-state files before each link
/c Treats case as significant in symbols
/d Delay loads a dll
/D:xxxx Save specified description
/Enn Specifies the number of max errors
/GC Image comment string
/GD Generates a DRC file
/GF:xxxx Set image flags
/Gk Keep output files on error
/Gl Generate .LIB file
/Gpd Generate design-time-only package
/Gpr Generate runtime-only package
/Gn Don’t generate state files (disable incremental linking)
/GS:string Set section flags
/Gz Calculate checksum of target and insert result in PE header
/H:xxxx Specifies application heap reserve size
/Hc:nnnn Specifies application heap commit size
/I Specifies intermediate file output directory
/j Specifies object search paths
/L Specifies library search paths
/M Mangled names in map file
/m Creates map file with public names
/q Supress command line banner
/r Verbose linking
/Rr Replace resources
/S:xxxx Specifies application stack reserve size
/Sc:xxxx Specifies application stack commit size
/s Detailed map file of segments
/Tpd Targets a Windows .DLL file
/Tpe Targets a Windows .EXE file
/Tpp Generate package
/t Displays time spent on link
/Ud.d Specifies user version(major,minor)
/Vd.d Specifies expected Windows version
/v Includes full symbolic debug information
/w Turn all warnings on
/w-dee Disables “.EXE module built with a .DLL or BPL extension” warning
/w-dpl Disables “Duplicate symbol in library” warning
/w-dup Disables “Duplicate symbol” warning
/w-exp Enables “Attempt to export non-public symbol” warning
/w-nou Disables “Creating a package without any units” warning
/w-rty Enables “Unable to perform incremental link - performing full link” warning
/w-srd Disables “Stripping relocations from a DLL may cause it to malfunction” warning
/w-snf Disables “Section not found” warning
/w-uld Disables “Unable to load DLL” warning
/x Suppresses creation of map file
Default map file of segments (no linker switch, map file created by default)
Re: xHarbour vs Harbour
Posted: Tue Dec 09, 2014 11:29 am
by Enrico Maria Giordano
Thank you. I tried with /m to no avail.
EMG
Re: xHarbour vs Harbour
Posted: Tue Dec 09, 2014 5:44 pm
by Antonio Linares
Enrico,
How are you building the EXE ?
Are you using a batch file or a make file ?
Could you post it here ? thanks
Re: xHarbour vs Harbour
Posted: Tue Dec 09, 2014 6:47 pm
by Enrico Maria Giordano
Antonio,
a batch file. Here it is:
Code: Select all
SET HARBOURCMD=/a /es2 /gc0 /m /n /q /w3
SET INCLUDE=e:\xharbour\include;e:\bcc\include
e:\xharbour\harbour %1
SET HARBOURCMD=
SET INCLUDE=
IF EXIST %1.c e:\bcc\bin\bcc32 +e:\xharbour\xharbour.cfg -c %1.c
IF EXIST %1.obj e:\bcc\bin\ilink32 c0x32 %1, %1.EXE @e:\xharbour\xharbour.rsp
XHARBOUR.CFG
Code: Select all
-6
-a4
-DHB_GUI
-DHB_INCLUDE_WINEXCHANDLER
-DHB_NO_PROFILER
-DHB_NO_TRACE
-DHB_WIN32_IO
-d
-g0
-Ie:\xharbour\include;e:\bcc\include;e:\bcc\include\windows\crtl;e:\bcc\include\windows\sdk
-k-
-O
-O1
-O2
-OS
-Ob
-Oc
-Ov
-v-
-WC
-w
XHARBOUR.RSP
Code: Select all
/ap +
/Gn +
/Le:\xharbour\lib +
/x
rtl +
vm +
common +
lang +
rdd +
macro +
hbsix +
dbfntx +
pcrepos +
dbffpt +
gtwin +
dbfcdx +
ct +
cw32 +
import32 +
iphlpapi
EMG
Re: xHarbour vs Harbour
Posted: Tue Dec 09, 2014 8:44 pm
by Antonio Linares
Enrico,
Please try this:
IF EXIST %1.obj e:\bcc\bin\ilink32 c0x32 %1, %1.EXE, %1.MAP @e:\xharbour\xharbour.rsp
Re: xHarbour vs Harbour
Posted: Tue Dec 09, 2014 10:08 pm
by Enrico Maria Giordano
Found! Switch /x prevented creation of MAP file.
Now, I need to know what type of map I must generate:
Code: Select all
-M Map with mangled names
-m Map file with publics
-s Detailed segment map
EMG
Re: xHarbour vs Harbour
Posted: Tue Dec 09, 2014 10:32 pm
by Antonio Linares
Enrico,
Why don't you try each of them and compare the results ?