xHarbour vs Harbour

User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

xHarbour vs Harbour

Post 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
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: xHarbour vs Harbour

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: xHarbour vs Harbour

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

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: xHarbour vs Harbour

Post 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
hmpaquito
Posts: 1200
Joined: Thu Oct 30, 2008 2:37 pm

Re: xHarbour vs Harbour

Post by hmpaquito »

Enrico,

Have you thought raise your doubt in the list of users Harbour?

https://groups.google.com/forum/?fromgr ... bour-users

Regards
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: xHarbour vs Harbour

Post by Antonio Linares »

Enrico,

have you compared the map files ? :-)

That will explain it...
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: xHarbour vs Harbour

Post 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
hmpaquito
Posts: 1200
Joined: Thu Oct 30, 2008 2:37 pm

Re: xHarbour vs Harbour

Post 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)
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: xHarbour vs Harbour

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

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: xHarbour vs Harbour

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: xHarbour vs Harbour

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

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: xHarbour vs Harbour

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: xHarbour vs Harbour

Post by Antonio Linares »

Enrico,

Why don't you try each of them and compare the results ? :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply