Building Harbour 3.4 for BCC outside MSYS

Re: Building Harbour 3.4 for BCC outside MSYS

Postby Enrico Maria Giordano » Sat Dec 23, 2017 2:01 pm

Ok, this is my first attempt that is working fine:

Code: Select all  Expand view  RUN
@ ECHO OFF

SET MSC32=e:\fw\msc
SET HRB32=e:\fw\xharbour
SET FWH32=e:\fwharbour

SET HARBOURCMD=-a -es2 -gc0 -i%HRB32%\include -n -q -w3

SET CL=-c -EHsc -I%MSC32%\include -Ox

IF EXIST %1.prg %HRB32%\harbour %1 -i%FWH32%\include -wb-
IF EXIST %1.c %MSC32%\bin\cl -I%HRB32%\include %1.c
IF EXIST %1.obj %MSC32%\bin\link -out:%1.EXE -libpath:%HRB32%\lib -libpath:%MSC32%\lib -subsystem:windows -nodefaultlib:libc -nodefaultlib:msvcrt -force:multiple %1 %FWH32%\lib\fivehmx.lib %FWH32%\lib\fivehc32.lib @%HRB32%\hrb32.rsp @%MSC32%\msc32.rsp
IF EXIST %1.c DEL %1.c
IF EXIST %1.obj DEL %1.obj
IF EXIST %1.rc IF EXIST %1.res DEL %1.res
IF ERRORLEVEL 1 GOTO Error
IF NOT EXIST %1.exe GOTO Error
IF "%TIPO%" == "" ( %1 ) ELSE ( CALL mkupx %1.EXE )

:Error

PAUSE


This is HRB32.RSP:

Code: Select all  Expand view  RUN
vm.lib
gtwin.lib
rdd.lib
common.lib
rtl.lib
lang.lib
macro.lib
hbsix.lib
dbfntx.lib
pcrepos.lib
dbffpt.lib
dbfcdx.lib
hbzip.lib
zlib.lib
ct.lib
gtgui.lib
tip.lib


And this is MSC32.RSP:

Code: Select all  Expand view  RUN
msimg32.lib
gdiplus.lib
oledlg.lib


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

Re: Building Harbour 3.4 for BCC outside MSYS

Postby Enrico Maria Giordano » Sat Dec 23, 2017 2:07 pm

Anyway, the EXE generated with MSC32 is bigger than the one generated with BCC32. :-(

And what is the worse, the execution is slower, even in reading DBF records and indexes. :-( :-( :-(

I will surely stay with BCC32.

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

Re: Building Harbour 3.4 for BCC outside MSYS

Postby Enrico Maria Giordano » Fri Dec 29, 2017 3:32 pm

Any news on this important subject? Something wrong in my compile batch?

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

Re: Building Harbour 3.4 for BCC outside MSYS

Postby Enrico Maria Giordano » Fri Dec 29, 2017 3:54 pm

This is my speedtest results:

BCC730

Code: Select all  Expand view  RUN
12/29/17 16:48:54 Windows 8 6.2.9200
xHarbour 1.2.3 Intl. (SimpLex) (Build 20171219) Borland/Embarcadero C++ 7.3 (32-bit) ?
THREADS: 0
N_LOOPS: 1000000
[ T000: empty loop overhead ]...................................0.05
====================================================================
[ T001: x := L_C ]..............................................0.03
[ T002: x := L_N ]..............................................0.06
[ T003: x := L_D ]..............................................0.05
[ T004: x := S_C ]..............................................0.03
[ T005: x := S_N ]..............................................0.03
[ T006: x := S_D ]..............................................0.03
[ T007: x := M->M_C ]...........................................0.05
[ T008: x := M->M_N ]...........................................0.03
[ T009: x := M->M_D ]...........................................0.03
[ T010: x := M->P_C ]...........................................0.03
[ T011: x := M->P_N ]...........................................0.03
[ T012: x := M->P_D ]...........................................0.03
[ T013: x := F_C ]..............................................0.09
[ T014: x := F_N ]..............................................0.14
[ T015: x := F_D ]..............................................0.06
[ T016: x := o:Args ]...........................................0.19
[ T017: x := o[2] ].............................................0.06
[ T018: round( i / 1000, 2 ) ]..................................0.22
[ T019: str( i / 1000 ) ].......................................0.59
[ T020: val( s ) ]..............................................0.19
[ T021: val( a [ i % 16 + 1 ] ) ]...............................0.33
[ T022: dtos( d - i % 10000 ) ].................................0.30
[ T023: eval( { || i % 16 } ) ].................................0.31
[ T024: eval( bc := { || i % 16 } ) ]...........................0.23
[ T025: eval( { |x| x % 16 }, i ) ].............................0.25
[ T026: eval( bc := { |x| x % 16 }, i ) ].......................0.22
[ T027: eval( { |x| f1( x ) }, i ) ]............................0.36
[ T028: eval( bc := { |x| f1( x ) }, i ) ]......................0.31
[ T029: eval( bc := &("{ |x| f1( x ) }"), i ) ].................0.31
[ T030: x := &( "f1(" + str(i) + ")" ) ]........................2.00
[ T031: bc := &( "{|x|f1(x)}" ), eval( bc, i ) ]................2.09
[ T032: x := valtype( x ) +  valtype( i ) ].....................0.38
[ T033: x := strzero( i % 100, 2 ) $ a[ i % 16 + 1 ] ]..........0.56
[ T034: x := a[ i % 16 + 1 ] == s ].............................0.20
[ T035: x := a[ i % 16 + 1 ] = s ]..............................0.25
[ T036: x := a[ i % 16 + 1 ] >= s ].............................0.22
[ T037: x := a[ i % 16 + 1 ] <= s ].............................0.23
[ T038: x := a[ i % 16 + 1 ] < s ]..............................0.22
[ T039: x := a[ i % 16 + 1 ] > s ]..............................0.23
[ T040: ascan( a, i % 16 ) ]....................................0.28
[ T041: ascan( a, { |x| x == i % 16 } ) ].......................2.25
[ T042: iif( i%1000==0, a:={}, ) , aadd(a,{i,1,.T.,s,s2,a2 ]....0.55
[ T043: x := a ]................................................0.03
[ T044: x := {} ]...............................................0.08
[ T045: f0() ]..................................................0.09
[ T046: f1( i ) ]...............................................0.17
[ T047: f2( c[1...8] ) ]........................................0.13
[ T048: f2( c[1...40000] ) ]....................................0.13
[ T049: f2( @c[1...40000] ) ]...................................0.11
[ T050: f2( @c[1...40000] ), c2 := c ]..........................0.14
[ T051: f3( a, a2, s, i, s2, bc, i, n, x ) ]....................0.33
[ T052: f2( a ) ]...............................................0.13
[ T053: x := f4() ].............................................0.50
[ T054: x := f5() ].............................................0.31
[ T055: x := space(16) ]........................................0.16
[ T056: f_prv( c ) ]............................................0.47
====================================================================
[ total application time: ]....................................19.47
[ total real time: ]...........................................19.52



MSC:

Code: Select all  Expand view  RUN
12/29/17 16:46:02 Windows 8 6.2.9200
xHarbour 1.2.3 Intl. (SimpLex) (Build 20171219) Microsoft Visual C++ 19.11.25547 (32-bit) ?
THREADS: 0
N_LOOPS: 1000000
[ T000: empty loop overhead ]...................................0.06
====================================================================
[ T001: x := L_C ]..............................................0.05
[ T002: x := L_N ]..............................................0.05
[ T003: x := L_D ]..............................................0.06
[ T004: x := S_C ]..............................................0.05
[ T005: x := S_N ]..............................................0.03
[ T006: x := S_D ]..............................................0.03
[ T007: x := M->M_C ]...........................................0.06
[ T008: x := M->M_N ]...........................................0.05
[ T009: x := M->M_D ]...........................................0.05
[ T010: x := M->P_C ]...........................................0.05
[ T011: x := M->P_N ]...........................................0.05
[ T012: x := M->P_D ]...........................................0.03
[ T013: x := F_C ]..............................................0.23
[ T014: x := F_N ]..............................................0.14
[ T015: x := F_D ]..............................................0.09
[ T016: x := o:Args ]...........................................0.31
[ T017: x := o[2] ].............................................0.08
[ T018: round( i / 1000, 2 ) ]..................................0.30
[ T019: str( i / 1000 ) ].......................................0.66
[ T020: val( s ) ]..............................................0.27
[ T021: val( a [ i % 16 + 1 ] ) ]...............................0.41
[ T022: dtos( d - i % 10000 ) ].................................0.39
[ T023: eval( { || i % 16 } ) ].................................0.56
[ T024: eval( bc := { || i % 16 } ) ]...........................0.33
[ T025: eval( { |x| x % 16 }, i ) ].............................0.44
[ T026: eval( bc := { |x| x % 16 }, i ) ].......................0.31
[ T027: eval( { |x| f1( x ) }, i ) ]............................0.61
[ T028: eval( bc := { |x| f1( x ) }, i ) ]......................0.48
[ T029: eval( bc := &("{ |x| f1( x ) }"), i ) ].................0.48
[ T030: x := &( "f1(" + str(i) + ")" ) ]........................3.86
[ T031: bc := &( "{|x|f1(x)}" ), eval( bc, i ) ]................4.02
[ T032: x := valtype( x ) +  valtype( i ) ].....................0.63
[ T033: x := strzero( i % 100, 2 ) $ a[ i % 16 + 1 ] ]..........0.80
[ T034: x := a[ i % 16 + 1 ] == s ].............................0.25
[ T035: x := a[ i % 16 + 1 ] = s ]..............................0.30
[ T036: x := a[ i % 16 + 1 ] >= s ].............................0.28
[ T037: x := a[ i % 16 + 1 ] <= s ].............................0.28
[ T038: x := a[ i % 16 + 1 ] < s ]..............................0.28
[ T039: x := a[ i % 16 + 1 ] > s ]..............................0.28
[ T040: ascan( a, i % 16 ) ]....................................0.38
[ T041: ascan( a, { |x| x == i % 16 } ) ].......................3.50
[ T042: iif( i%1000==0, a:={}, ) , aadd(a,{i,1,.T.,s,s2,a2 ]....1.05
[ T043: x := a ]................................................0.05
[ T044: x := {} ]...............................................0.14
[ T045: f0() ]..................................................0.20
[ T046: f1( i ) ]...............................................0.25
[ T047: f2( c[1...8] ) ]........................................0.22
[ T048: f2( c[1...40000] ) ]....................................0.23
[ T049: f2( @c[1...40000] ) ]...................................0.23
[ T050: f2( @c[1...40000] ), c2 := c ]..........................0.28
[ T051: f3( a, a2, s, i, s2, bc, i, n, x ) ]....................0.45
[ T052: f2( a ) ]...............................................0.23
[ T053: x := f4() ].............................................0.70
[ T054: x := f5() ].............................................0.58
[ T055: x := space(16) ]........................................0.34
[ T056: f_prv( c ) ]............................................0.83
====================================================================
[ total application time: ]....................................30.78
[ total real time: ]...........................................30.81


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

Re: Building Harbour 3.4 for BCC outside MSYS

Postby Enrico Maria Giordano » Fri Dec 29, 2017 3:56 pm

Please note the difference in total time:

BCC:

Code: Select all  Expand view  RUN
[ total application time: ]....................................19.47
[ total real time: ]...........................................19.52


MSC:

Code: Select all  Expand view  RUN
[ total application time: ]....................................30.78
[ total real time: ]...........................................30.81


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

Re: Building Harbour 3.4 for BCC outside MSYS

Postby byte-one » Fri Dec 29, 2017 4:59 pm

Enrico,
this are my Compiler-flags: See on O2! (fastest Speed)
MSC_COMP_FLAGS = /c /TP /W3 /O2 /D__FLAT__ /GA /GS- /EHsc
I use HARBOUR and my results are on same test are vice versa as yours!
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria



Re: Building Harbour 3.4 for BCC outside MSYS

Postby byte-one » Fri Dec 29, 2017 7:42 pm

BORLANDC_COMP_FLAGS = -P -c -O2
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: Building Harbour 3.4 for BCC outside MSYS

Postby Enrico Maria Giordano » Fri Dec 29, 2017 9:50 pm

Try these:

Code: Select all  Expand view  RUN
-6
-DHB_GUI
-DHB_INCLUDE_WINEXCHANDLER
-DHB_NO_PROFILER
-DHB_NO_TRACE
-DHB_WIN32_IO
-Ie:\bcc\include\windows\crtl;e:\bcc\include\windows\sdk;e:\bcc\include\dinkumware
-O
-O1
-O2
-OS
-Ob
-Oc
-Ov
-c
-d
-g0
-k-
-v-
-w


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

Re: Building Harbour 3.4 for BCC outside MSYS

Postby Enrico Maria Giordano » Fri Dec 29, 2017 9:52 pm

Anyway, -P and -TP instruct the compiler to always compile in C++ mode and I don't think this is right.

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

Re: Building Harbour 3.4 for BCC outside MSYS

Postby Rick Lipkin » Sat Dec 30, 2017 2:20 pm

Enrico

I desperately tried to make the MSVC Command line binaries work with xHarbour .. unfortunately, I could not make BuildxM work and gave up. The final result was I could create the .exe but the program would not run .. there was no warning message .. the .exe would do nothing when you ran it.

I like the idea of MSVC command line ( like Borland ) because you do not have to worry about the dot net bloat of having to install Visual Studio. I am watching this thread to see if anyone can create a working BuildxM using xHarbour MSVC 2017 and Andi's MSVC binaries.

Thanks
Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Building Harbour 3.4 for BCC outside MSYS

Postby Enrico Maria Giordano » Sat Dec 30, 2017 3:32 pm

Rick,

please look back in this thread. I reported a batch that works perfectly with MSVC 2017, FWH and xHarbour. Try it and let me know the result.

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

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Otto and 55 guests