FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Antonio: Differences between BORLAND and VCC
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
Antonio: Differences between BORLAND and VCC
Posted: Mon Apr 23, 2018 12:31 PM
  1. If i use cGetDir(..) and choose a USB-drive for camera-cards BUT WITHOUT any inserted camera-card, the programm crashes in some times!
  2. When using shadow() in MS-VC the shadow are bigger then in Borland and on some dialogs the wide (height?) of the dialog are cutting a little on right(bottom?) side.
Regards,
Günther
---------------------------------
office@byte-one.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Antonio: cGetDir and ::shadow()
Posted: Tue Apr 24, 2018 07:10 AM

Günther,

  1. Please check if a hb_out.log file is created

  2. Check the manifest files embedded into the EXE

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
Re: Antonio: cGetDir and ::shadow()
Posted: Tue Apr 24, 2018 08:46 AM
Antonio, from the first point the hb_out.log:
Application Internal Error - C:\WGUN\GUN1\gun32.exe
Terminated at: 2018-04-23 14:22:53
Unrecoverable error 9015: Symbol item expected from hb_vmDo()
Called from ASCAN(0)
Called from OWNDFROMHWND(3695) in .\source\classes\WINDOW.PRG
Called from FWSKINBTNPAINT(72) in C:\prg_allgemein\skins.prg
Called from FWSKINBTNFOCUSED(363) in C:\prg_allgemein\skins.prg
Called from CGETDIR(0)


On second point: Same manifest in MS-VC and Borland
Regards,
Günther
---------------------------------
office@byte-one.com
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
Re: Antonio: cGetDir and ::shadow()
Posted: Wed Apr 25, 2018 08:03 AM
In the meantime i made some tests. No referring with ::shadow!
Please see the picture. On left side compiled with MS-VC, on right side compiled with Borland. It seems, only on dialogs from code!?



Code (fw): Select all Collapse
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
Regards,
Günther
---------------------------------
office@byte-one.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Antonio: cGetDir and ::shadow()
Posted: Wed Apr 25, 2018 08:38 AM
Please inspect both EXEs using this tool:

https://bitbucket.org/fivetech/fivewin-contributions/downloads/peinfo.exe

look for differences in the embedded manifest files and/or resources
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Antonio: cGetDir and ::shadow()
Posted: Wed Apr 25, 2018 08:39 AM
  1. looks like memory corruption
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
Re: Antonio: cGetDir and ::shadow()
Posted: Wed Apr 25, 2018 09:15 AM

Thanks Antonio.
1. The error is present on all machines.
2. I inspect the files with PE but no differences. I compile with the exact same RC-File. Have you tested the code?

Regards,
Günther
---------------------------------
office@byte-one.com
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
Re: Antonio: cGetDir and ::shadow()
Posted: Sat Apr 28, 2018 11:10 AM

Any news?
I found also that in dialogs from resource the height of the caption-area between MS-VC and Borland are different. Maybe different constants in the header-files from the compilers? For the moment i cannot use MS-VC.

Regards,
Günther
---------------------------------
office@byte-one.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Antonio: cGetDir and ::shadow()
Posted: Sun Apr 29, 2018 07:54 PM

We are checking it but can't see where the difference comes from yet

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
Re: Diffferences
Posted: Wed May 16, 2018 01:13 PM

Hello to all. I not can found any reason for the differences on the both compilers. Can please several from us test the above code with VCC and report!?

Regards,
Günther
---------------------------------
office@byte-one.com
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Antonio: Differences between BORLAND and VCC
Posted: Wed May 16, 2018 01:20 PM

Gunther, I tested your sample also and I continue to investigate why

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Antonio: Differences between BORLAND and VCC
Posted: Wed May 16, 2018 01:29 PM

To All

I have tried to create a script to compile MSVC 2017 using BuildxM ( xHarbour ) as my guide ( as you may remember ), unfortunately I gave up because I could not get any script or suggestions from the forum to cleanly compile tutor01.prg.

If anyone could post a working MSVC\xHarbour script .. I would be glad to help in comparing the difference between the two compilers.

Rick Lipkin

Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Antonio: Differences between BORLAND and VCC
Posted: Wed May 16, 2018 05:02 PM

Rick,

I do not use Borland, but I do create two builds of my primary application.
1). xHarbour ( .com / xBuilder with Pelles C ) using the version from 11/2015
2). Microsoft Visual Studio 2017 with Harbour libraries

Option 1 is only used by people who have ADS Version 7 or 8 and I have the proper libs for those in xHarbour.
Option 2 is for everyone else.

I have never tried Microsoft Visual C++ with xHarbour. I once was going to and was told there were no MSVC compatible libraries available for the commercial product.

I can assure you that Harbour and Microsoft Visual C++ work very well with FWH, and almost all of my clients use that version.

I should note: Visual Studio Community 2017 is FREE and quite capable of building any application. Antonio provides Harbour also for free. If you were to go that route, you would have no problem getting up and running. I actually do the builds in Visual Studio, and you can actually incorporate your editor of choice in the IDE ( I use UE Studio ).

Tim

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: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Antonio: Differences between BORLAND and VCC
Posted: Wed May 16, 2018 09:13 PM
Tim or Anyone

I have downloaded the MSVC2017 32 bit Command line Compiler ( from Mel's site .. you do not need to install Visual Studio )



And the matching xHarbourM for MSVC2017


I would appreciate if anyone has a batch file ( like buildxm.bat ) to be able to compile tutor01.prg ... here are my file locations:

c:\MSVC2017
c:\Fwh1707
c:\XharbourM

Thanks
Rick Lipkin
Posts: 58
Joined: Thu Oct 13, 2005 01:26 PM
Re: Antonio: Differences between BORLAND and VCC
Posted: Thu May 17, 2018 08:03 AM
compiled with Harbour + Fivewin 18.03 and GCC 7.3 32 bit



compiled with Harbour + Fivewin 18.03 and GCC 7.3 64 bit


regards