Antonio: Differences between BORLAND and VCC

Re: Antonio: Differences between BORLAND and VCC

Postby Enrico Maria Giordano » Thu May 17, 2018 1:59 pm

Rick Lipkin wrote:I would appreciate if anyone has a batch file ( like buildxm.bat ) to be able to compile tutor01.prg


What problem did you get using buildxm.bat?

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

Re: Antonio: Differences between BORLAND and VCC

Postby Rick Lipkin » Thu May 17, 2018 8:06 pm

Enrico

I gave up on MSVC .... here was the last test before I gave up ... this how I modified my batch file:

Code: Select all  Expand view  RUN

@ECHO OFF
CLS
ECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
ECHO ³ FiveWin for Harbour 14.09 (MSVC++) Sep. 2014     Harbour development power ³Ü
ECHO ³ (c) FiveTech, 1993-2014   for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7/8 ³Û
ECHO ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ
ECHO ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

if A%1 == A GOTO :SINTAX
if NOT EXIST %1.prg GOTO :NOEXIST

ECHO Compiling...

set hdir=c:\xharbourM
set vcdir=c:\msvc2017
set include=%vcdir%\include;%hdir%\include;%include%
set lib=%vcdir%\lib;%hdir%\lib;%lib%


rem @set fwh=%FWDIR%
rem @set hdir=%HBDIR%
rem @set hdirl=%hdir%\lib

rem set vcdir= c:\vc
rem set vclib=%vcdir%\lib


%hdir%\bin\harbour %1 /n /ic:\Fwh1707\include;%hdir%\include /w /p %2 %3 > comp.log 2> warnings.log
IF ERRORLEVEL 1 GOTO COMPILEERROR
@type comp.log
@type warnings.log

IF ERRORLEVEL 1 PAUSE
IF ERRORLEVEL 1 GOTO EXIT

: mvsc compiler line

%vcdir%\bin\cl.Exe -TP -W3 -O2 -nologo -c -GA -GS -EHsc /I%hdir%\include /I%vcdir%\include %1.c

:ENDCOMPILE

IF EXIST %1.rc IF EXIST %vcdir%\bin\rc %vcdir%\bin\rc -r -d__FLAT__ %1
IF EXIST %1.rc IF NOT EXIST %1.res rc -r -d__FLAT__ %1

echo %1.obj  > msvc.tmp

: fivewin libs
echo c:\Fwh1707\lib\FivehMX.lib c:\fwh1707\lib\FiveHc32.lib  >> msvc.tmp

: xHarbourM libs

echo %hdir%\lib\rtl.lib    >> msvc.tmp
echo %hdir%\lib\vm.lib     >> msvc.tmp
echo %hdir%\lib\gtgui.lib  >> msvc.tmp
echo %hdir%\lib\lang.lib   >> msvc.tmp
echo %hdir%\lib\macro.lib  >> msvc.tmp
echo %hdir%\lib\rdd.lib    >> msvc.tmp
echo %hdir%\lib\dbfntx.lib >> msvc.tmp
echo %hdir%\lib\dbfcdx.lib >> msvc.tmp
echo %hdir%\lib\dbffpt.lib >> msvc.tmp
echo %hdir%\lib\hbsix.lib  >> msvc.tmp
echo %hdir%\lib\debug.lib  >> msvc.tmp
echo %hdir%\lib\common.lib >> msvc.tmp
echo %hdir%\lib\pp.lib     >> msvc.tmp
echo %hdir%\lib\pcrepos.lib >> msvc.tmp
echo %hdir%\lib\png.lib     >> msvc.tmp

echo %hdir%\lib\ct.lib  >> msvc.tmp

rem ... can not find this in xHarbourM
rem echo %hdir%\lib\hbzlib.lib  >> msvc.tmp

echo %hdir%\lib\zlib.lib   >> msvc.tmp
echo %hdir%\lib\HBMzip.lib  >> msvc.tmp
echo %hdir%\lib\HBzip.lib  >> msvc.tmp

: msvc libs

echo %vcdir%\lib\kernel32.lib  >> msvc.tmp
echo %vcdir%\lib\user32.lib    >> msvc.tmp
echo %vcdir%\lib\gdi32.lib     >> msvc.tmp
echo %vcdir%\lib\winspool.lib  >> msvc.tmp
echo %vcdir%\lib\comctl32.lib  >> msvc.tmp
echo %vcdir%\lib\comdlg32.lib  >> msvc.tmp
echo %vcdir%\lib\advapi32.lib  >> msvc.tmp
echo %vcdir%\lib\shell32.lib   >> msvc.tmp
echo %vcdir%\lib\ole32.lib     >> msvc.tmp
echo %vcdir%\lib\oleaut32.lib  >> msvc.tmp
echo %vcdir%\lib\uuid.lib      >> msvc.tmp
echo %vcdir%\lib\odbc32.lib    >> msvc.tmp
echo %vcdir%\lib\odbccp32.lib  >> msvc.tmp
echo %vcdir%\lib\iphlpapi.lib  >> msvc.tmp
echo %vcdir%\lib\mpr.lib       >> msvc.tmp
echo %vcdir%\lib\version.lib   >> msvc.tmp
echo %vcdir%\lib\wsock32.lib   >> msvc.tmp
echo %vcdir%\lib\msimg32.lib   >> msvc.tmp
echo %vcdir%\lib\oledlg.lib    >> msvc.tmp
echo %vcdir%\lib\psapi.lib     >> msvc.tmp
echo %vcdir%\lib\gdiplus.lib   >> msvc.tmp
echo %vcdir%\lib\winmm.lib     >> msvc.tmp
echo %vcdir%\lib\libcmt.lib    >> msvc.tmp
echo %vcdir%\lib\oldnames.lib  >> msvc.tmp
echo %vcdir%\lib\libcpmt.lib   >> msvc.tmp
echo %vcdir%\lib\ws2_32.lib    >> msvc.tmp

IF EXIST %1.res echo %1.res >> msvc.tmp

%vcdir%\bin\link @msvc.tmp /nologo /NODEFAULTLIB:LIBC /NODEFAULTLIB:msvcrt /force:multiple /nxcompat:NO /subsystem:windows,5.01 /machine:X86 /Ignore:4006 /LIBPATH:c:\Msvc17\lib
rem %vcdir%\bin\link @msvc.tmp /nologo  /NODEFAULTLIB:msvcrt /force:multiple /nxcompat:NO /subsystem:windows,5.01 /machine:X86 /Ignore:4006 /LIBPATH:c:\Msvc17\lib

IF ERRORLEVEL 1 GOTO LINKERROR
ECHO * Application successfully built *
@set path=%oldpath%
@set include=%oldinclude%
@set lib=%oldlib%
@set libpath=%oldlibpath%
@set oldpath=""
@set oldinclude=""
@set oldlib=""
@set oldlibpath=""
%1
GOTO EXIT
ECHO

: delete temporary files

@del %1.c
@del msvc.tmp

:COMPILEERROR
@type comp.log
@type warnings.log
ECHO * Compiling errors *
GOTO EXIT

:LINKERROR
ECHO * Linking errors *
GOTO EXIT

:SINTAX
ECHO    SYNTAX: Build [Program]     {-- No especifiques la extensi¢n PRG
ECHO                                {-- Don't specify .PRG extension
GOTO EXIT

:NOEXIST
ECHO The specified PRG %1 does not exist

:EXIT


Here was the result:

Code: Select all  Expand view  RUN

ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ FiveWin for Harbour 14.09 (MSVC++) Sep. 2014     Harbour development power ³Ü
³ (c) FiveTech, 1993-2014   for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7/8 ³Û
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ
ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
Compiling...
xHarbour 1.2.3 Intl. (SimpLex) (Build 20180420)
Copyright 1999-2018, http://www.xharbour.org http://www.harbour-project.org/
Compiling 'Tutor01.prg' and generating preprocessed output to 'Tutor01.ppo'...

Generating C source output to 'Tutor01.c'...
Done.

Lines 13, Functions/Procedures 1, pCodes 14
Tutor01.c
   Creating library Tutor01.lib and object Tutor01.exp
Tutor01.exe : warning LNK4088: image being generated due to /FORCE option; image may not run
* Application successfully built *
 



Msvc.Tmp
Code: Select all  Expand view  RUN

Tutor01.obj  
c:\Fwh1707\lib\FivehMX.lib c:\fwh1707\lib\FiveHc32.lib  
c:\xharbourM\lib\rtl.lib    
c:\xharbourM\lib\vm.lib    
c:\xharbourM\lib\gtgui.lib  
c:\xharbourM\lib\lang.lib  
c:\xharbourM\lib\macro.lib  
c:\xharbourM\lib\rdd.lib    
c:\xharbourM\lib\dbfntx.lib
c:\xharbourM\lib\dbfcdx.lib
c:\xharbourM\lib\dbffpt.lib
c:\xharbourM\lib\hbsix.lib  
c:\xharbourM\lib\debug.lib  
c:\xharbourM\lib\common.lib
c:\xharbourM\lib\pp.lib    
c:\xharbourM\lib\pcrepos.lib
c:\xharbourM\lib\png.lib    
c:\xharbourM\lib\ct.lib  
c:\xharbourM\lib\zlib.lib  
c:\xharbourM\lib\HBMzip.lib  
c:\xharbourM\lib\HBzip.lib  
c:\msvc2017\lib\kernel32.lib  
c:\msvc2017\lib\user32.lib    
c:\msvc2017\lib\gdi32.lib    
c:\msvc2017\lib\winspool.lib  
c:\msvc2017\lib\comctl32.lib  
c:\msvc2017\lib\comdlg32.lib  
c:\msvc2017\lib\advapi32.lib  
c:\msvc2017\lib\shell32.lib  
c:\msvc2017\lib\ole32.lib    
c:\msvc2017\lib\oleaut32.lib  
c:\msvc2017\lib\uuid.lib      
c:\msvc2017\lib\odbc32.lib    
c:\msvc2017\lib\odbccp32.lib  
c:\msvc2017\lib\iphlpapi.lib  
c:\msvc2017\lib\mpr.lib      
c:\msvc2017\lib\version.lib  
c:\msvc2017\lib\wsock32.lib  
c:\msvc2017\lib\msimg32.lib  
c:\msvc2017\lib\oledlg.lib    
c:\msvc2017\lib\psapi.lib    
c:\msvc2017\lib\gdiplus.lib  
c:\msvc2017\lib\winmm.lib    
c:\msvc2017\lib\libcmt.lib    
c:\msvc2017\lib\oldnames.lib  
c:\msvc2017\lib\libcpmt.lib  
c:\msvc2017\lib\ws2_32.lib    
Tutor01.res
 



The resulting Tutor01.exe will not run

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

Re: Antonio: Differences between BORLAND and VCC

Postby Enrico Maria Giordano » Thu May 17, 2018 9:52 pm

Just remove -TP from here:

Code: Select all  Expand view  RUN
%vcdir%\bin\cl.Exe -TP -W3 -O2 -nologo -c -GA -GS -EHsc /I%hdir%\include /I%vcdir%\include %1.c


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


Re: Antonio: Differences between BORLAND and VCC

Postby Rick Lipkin » Fri May 18, 2018 6:27 pm

ENrico

I made the change you suggested .. same result .. Tutor01.exe is created but will not run ..

Code: Select all  Expand view  RUN

@ECHO OFF
CLS
ECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
ECHO ³ FiveWin for Harbour 14.09 (MSVC++) Sep. 2014     Harbour development power ³Ü
ECHO ³ (c) FiveTech, 1993-2014   for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7/8 ³Û
ECHO ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ
ECHO ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

if A%1 == A GOTO :SINTAX
if NOT EXIST %1.prg GOTO :NOEXIST


rem if "%FWDIR%" == "" set FWDIR=.\..
rem if "%HBDIR%" == "" set HBDIR=c:\xHarbourM


ECHO Compiling...

set hdir=c:\xharbourM
set vcdir=c:\msvc2017
set include=%vcdir%\include;%hdir%\include;%include%
set lib=%vcdir%\lib;%hdir%\lib;%lib%


rem @set fwh=%FWDIR%
rem @set hdir=%HBDIR%
rem @set hdirl=%hdir%\lib

rem set vcdir= c:\vc
rem set vclib=%vcdir%\lib


%hdir%\bin\harbour %1 /n /ic:\Fwh1707\include;%hdir%\include /w /p %2 %3 > comp.log 2> warnings.log
IF ERRORLEVEL 1 GOTO COMPILEERROR
@type comp.log
@type warnings.log

IF ERRORLEVEL 1 PAUSE
IF ERRORLEVEL 1 GOTO EXIT

: mvsc compiler line

rem %vcdir%\bin\cl.Exe -TP -W3 -O2 -nologo -c -GA -GS -EHsc /I%hdir%\include /I%vcdir%\include %1.c

%vcdir%\bin\cl.Exe -W3 -O2 -nologo -c -GA -GS -EHsc /I%hdir%\include /I%vcdir%\include %1.


:ENDCOMPILE

IF EXIST %1.rc IF EXIST %vcdir%\bin\rc %vcdir%\bin\rc -r -d__FLAT__ %1
IF EXIST %1.rc IF NOT EXIST %1.res rc -r -d__FLAT__ %1

echo %1.obj  > msvc.tmp

: fivewin libs
echo c:\Fwh1707\lib\FivehMX.lib c:\fwh1707\lib\FiveHc32.lib  >> msvc.tmp

: xHarbourM libs

echo %hdir%\lib\rtl.lib    >> msvc.tmp
echo %hdir%\lib\vm.lib     >> msvc.tmp
echo %hdir%\lib\gtgui.lib  >> msvc.tmp
echo %hdir%\lib\lang.lib   >> msvc.tmp
echo %hdir%\lib\macro.lib  >> msvc.tmp
echo %hdir%\lib\rdd.lib    >> msvc.tmp
echo %hdir%\lib\dbfntx.lib >> msvc.tmp
echo %hdir%\lib\dbfcdx.lib >> msvc.tmp
echo %hdir%\lib\dbffpt.lib >> msvc.tmp
echo %hdir%\lib\hbsix.lib  >> msvc.tmp
echo %hdir%\lib\debug.lib  >> msvc.tmp
echo %hdir%\lib\common.lib >> msvc.tmp
echo %hdir%\lib\pp.lib     >> msvc.tmp
echo %hdir%\lib\pcrepos.lib >> msvc.tmp
echo %hdir%\lib\png.lib     >> msvc.tmp

echo %hdir%\lib\ct.lib  >> msvc.tmp

rem ... can not find this in xHarbourM
rem echo %hdir%\lib\hbzlib.lib  >> msvc.tmp

echo %hdir%\lib\zlib.lib   >> msvc.tmp
echo %hdir%\lib\HBMzip.lib  >> msvc.tmp
echo %hdir%\lib\HBzip.lib  >> msvc.tmp

: msvc libs

echo %vcdir%\lib\kernel32.lib  >> msvc.tmp
echo %vcdir%\lib\user32.lib    >> msvc.tmp
echo %vcdir%\lib\gdi32.lib     >> msvc.tmp
echo %vcdir%\lib\winspool.lib  >> msvc.tmp
echo %vcdir%\lib\comctl32.lib  >> msvc.tmp
echo %vcdir%\lib\comdlg32.lib  >> msvc.tmp
echo %vcdir%\lib\advapi32.lib  >> msvc.tmp
echo %vcdir%\lib\shell32.lib   >> msvc.tmp
echo %vcdir%\lib\ole32.lib     >> msvc.tmp
echo %vcdir%\lib\oleaut32.lib  >> msvc.tmp
echo %vcdir%\lib\uuid.lib      >> msvc.tmp
echo %vcdir%\lib\odbc32.lib    >> msvc.tmp
echo %vcdir%\lib\odbccp32.lib  >> msvc.tmp
echo %vcdir%\lib\iphlpapi.lib  >> msvc.tmp
echo %vcdir%\lib\mpr.lib       >> msvc.tmp
echo %vcdir%\lib\version.lib   >> msvc.tmp
echo %vcdir%\lib\wsock32.lib   >> msvc.tmp
echo %vcdir%\lib\msimg32.lib   >> msvc.tmp
echo %vcdir%\lib\oledlg.lib    >> msvc.tmp
echo %vcdir%\lib\psapi.lib     >> msvc.tmp
echo %vcdir%\lib\gdiplus.lib   >> msvc.tmp
echo %vcdir%\lib\winmm.lib     >> msvc.tmp
echo %vcdir%\lib\libcmt.lib    >> msvc.tmp
echo %vcdir%\lib\oldnames.lib  >> msvc.tmp
echo %vcdir%\lib\libcpmt.lib   >> msvc.tmp
echo %vcdir%\lib\ws2_32.lib    >> msvc.tmp

IF EXIST %1.res echo %1.res >> msvc.tmp

%vcdir%\bin\link @msvc.tmp /nologo /NODEFAULTLIB:LIBC /NODEFAULTLIB:msvcrt /force:multiple /nxcompat:NO /subsystem:windows,5.01 /machine:X86 /Ignore:4006 /LIBPATH:c:\Msvc17\lib

IF ERRORLEVEL 1 GOTO LINKERROR
ECHO * Application successfully built *
@set path=%oldpath%
@set include=%oldinclude%
@set lib=%oldlib%
@set libpath=%oldlibpath%
@set oldpath=""
@set oldinclude=""
@set oldlib=""
@set oldlibpath=""
%1
GOTO EXIT
ECHO

: delete temporary files

@del %1.c
@del msvc.tmp

:COMPILEERROR
@type comp.log
@type warnings.log
ECHO * Compiling errors *
GOTO EXIT

:LINKERROR
ECHO * Linking errors *
GOTO EXIT

:SINTAX
ECHO    SYNTAX: Build [Program]     {-- No especifiques la extensi¢n PRG
ECHO                                {-- Don't specify .PRG extension
GOTO EXIT

:NOEXIST
ECHO The specified PRG %1 does not exist

:EXIT


Code: Select all  Expand view  RUN

ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ FiveWin for Harbour 14.09 (MSVC++) Sep. 2014     Harbour development power ³Ü
³ (c) FiveTech, 1993-2014   for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7/8 ³Û
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ
ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
Compiling...
xHarbour 1.2.3 Intl. (SimpLex) (Build 20180420)
Copyright 1999-2018, http://www.xharbour.org http://www.harbour-project.org/
Compiling 'tutor01.prg' and generating preprocessed output to 'tutor01.ppo'...

Generating C source output to 'tutor01.c'...
Done.

Lines 13, Functions/Procedures 1, pCodes 14
cl : Command line warning D9021 : no action performed
   Creating library tutor01.lib and object tutor01.exp
tutor01.exe : warning LNK4088: image being generated due to /FORCE option; image may not run
* Application successfully built *

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

Re: Antonio: Differences between BORLAND and VCC

Postby Enrico Maria Giordano » Fri May 18, 2018 7:29 pm

Rick,

you missed a "c":

Code: Select all  Expand view  RUN
%vcdir%\bin\cl.Exe -W3 -O2 -nologo -c -GA -GS -EHsc /I%hdir%\include /I%vcdir%\include %1.


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

Re: Antonio: Differences between BORLAND and VCC

Postby byte-one » Sat May 19, 2018 10:33 am

A new test. As you see, the width and the height of the dialog are 10 pixels higher in MS-VCC. The dialog itself on the screen are exactly the same. Only the capture size is different.
The sizes of the dialogs are different in both cases from the code. See my code above. -> (DEFINE DIALOG oDlg FROM 50, 50 TO 250, 450 PIXEL TITLE "Test" FONT oFont)
Image
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: Antonio: Differences between BORLAND and VCC

Postby Rick Lipkin » Sat May 19, 2018 3:01 pm

Enrick

SUCCESS ... yes, I seemed to have dropped off .c at the end of the link line ...

%vcdir%\bin\cl.Exe -W3 -O2 -nologo -c -GA -GS -EHsc /I%hdir%\include /I%vcdir%\include %1.c



Thank you .. let me see if I can do some tests!

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

Re: Antonio: Differences between BORLAND and VCC

Postby nageswaragunupudi » Sat May 26, 2018 5:03 pm

But the client rect is identical in both cases.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10662
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Antonio: Differences between BORLAND and VCC

Postby Rick Lipkin » Sat May 26, 2018 6:15 pm

Günther

I tested your code with Bcc73\xHarbour and MSVC2017\xHarbour on Windows 10 Spring Creator Pro 64 bit and got the same result ... here is your code:
Code: Select all  Expand view  RUN

#Include "FIveWin.ch"

function dlg_test()

local oDlg, oFont, oMemo, oFile, oBtnok, oBtncancel, cFile := space(50), uTemp := " "

DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 0, -10

DEFINE DIALOG oDlg FROM 50, 50 TO 250, 450 PIXEL TITLE "Test" FONT oFont
   @ 4, 3 GET oMemo VAR uTemp MULTILINE OF oDlg PIXEL SIZE 100, 100 FONT oFont
   @ 0, 0 GET oFile VAR cFile OF oDlg PIXEL SIZE 100, 12 FONT oFont
   @ 0,0 BUTTON oBtnOk PROMPT "OK" SIZE 46, 13 ACTION oDlg:End()
   @ 0,0 BUTTON oBtnCancel PROMPT "&Zurück" SIZE 46, 13 ACTION oDlg:End()
   ACTIVATE DIALOG oDlg;
      ON INIT (  ;
                oMemo:SetSize( oDlg:nWidth() - 17, oDlg:nHeight() - 77 ),;
        oMemo:SetSel( 0,0 ), ;
                oFile:nTop      := oDlg:nHeight() - 64,;
                oFile:nLeft     := 6,;
                oBtnOk:nTop      := oDlg:nHeight() - 64,;
                oBtnOk:nLeft     := oDlg:nWidth() - 197,;
                oBtnCancel:nTop  := oDlg:nHeight() - 64,;
                oBtnCancel:nLeft := oDlg:nWidth() - 104;
                 )
   oFont:End()
return NIL
 


Here is the result:

Image

I just recently got MSVC2017 working and built your sample with my revised BuildxM.bat ... both results seem identical .. the blue title is because the Borland build was in focus.

Rick Lipkin
ps .. in order to test your code side by side .. I created Gunther1.prg for MSVC2017 and copied the same code to Gunther5.prg for Borland
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Antonio: Differences between BORLAND and VCC

Postby nageswaragunupudi » Sun May 27, 2018 1:13 am

It is true that the external dimensions of the dialog differ by 10 pixels (both height and width). But the client rect of the dialog is exactly the same in both and also same as the coordintates specified by us while creating the dialog.

So if we position the controls either with absolute coordinates or proportionate to the dimensions we used to create the dialog, the controls in both cases will be placed exactly at the sampe positons inside the dialog. So, this difference does not affect our programming.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10662
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Antonio: Differences between BORLAND and VCC

Postby byte-one » Mon May 28, 2018 8:37 am

In fact, ::nWidth()/::nHight()/::nWidth/::nHight/::GetRect() differs on both compilers and should not used to calculations for controls!?
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: Antonio: Differences between BORLAND and VCC

Postby nageswaragunupudi » Tue May 29, 2018 11:22 pm

In any case, it is not a good idea to use oDlg:nHeight or oDlg:nWidth for calculating relative position of controls, because these datas give external dimensions. Not client area dimensions.

I personally recommend this way:

local nDlgWidth := 400
local nDlgHeight := 200

DEFINE DIALOG oDlg SIZE nDlgWidth-1, nDlgHeight-1 PIXEL TRUEPIXEL.

Then calculate relative positions of controls with respect to nDlgWidth and nDlgHeight.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10662
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Antonio: Differences between BORLAND and VCC

Postby byte-one » Wed May 30, 2018 3:02 pm

Thanks, this is no problem to respect!
But i test also ::move(,,nWidth,nHeight) or ::SetSize( nWidth, nHeight). This methods also give differences. (in VCC also the 10 Pixels to small in both directions)
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: Antonio: Differences between BORLAND and VCC

Postby TimStone » Wed May 30, 2018 6:19 pm

I have to admit ... I don't understand why all the different compilers.

I build all code with two options:

1). Older xHabour ( .com version ) with xBuilder ...
2). Preferred option of Visual Studio 2017 Community edition ( MSVCC ) plus Harbour

I only use #1 for those who are using ADS Version 7 or 8 which I can't seem to address with the Harbour libraries. Version 9 and above work great.

So my question is this. Why try to use xHarbour with MSVCC, or use Borland ? What specific advantages do they provide to end users not found using MSVCC plus Harbour with FWH ?

My reason for preferring MS Visual Studio is quite simple. The bottom line is we are interacting with Microsoft Windows 10 ( and if not, you will be ), and obviously VS is built to address that platform. Thus, the fewest complications, and the greatest potential for future features lies with the tools that match the OS the most closely.

Am I missing something here ? I ask, because if all FWH features have to work across a wide variety of compilers, and two versions of the Harbour API ( Harbour, xHarbour ), then do we not slow down progress ?

Could this be part of the reason we are only on 18.03 as we enter are .06 month ?
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
User avatar
TimStone
 
Posts: 2946
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 52 guests