Switching to Microsoft Compiler.

Switching to Microsoft Compiler.

Postby byron.hopp » Wed Jul 25, 2018 4:06 pm

I currently have an app compiled in Borland c++ (Embarcadero C++ 7.0 for Win32).
My Fivewin is FWH 15.10.
My Harbour is Harbour 3.2.0dev (r1506171039)

If I want to attempt to recompile with a Microsoft compiler do I need a new Fivwin version, or basically what is required.

One of my customers moved from an existing 2-year-old Dell to new workstations and now my program seems to have black screens, especially in the Browser / Grid background area. One of the users has both her old and new workstations and the black screens only seem to appear on the new workstation with the integrated graphics. I recommended a new GPU at 30 to 60 dollars US, but they are asking for me to compile on a Microsoft platform.

Any help would be appreciated.

Thanks,

Byron ...
Thanks,
Byron Hopp
Matrix Computer Services
byron.hopp
 
Posts: 382
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA

Re: Switching to Microsoft Compiler.

Postby Antonio Linares » Thu Jul 26, 2018 6:19 am

Byron,

Please review FWH\samples\buildh32.bat for Microsoft compiler.

Also you may review FWH\makes\vs... makes files examples

FWH provides the libraries for Borland, Microsoft and gcc in your current setup
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42065
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Switching to Microsoft Compiler.

Postby TimStone » Thu Jul 26, 2018 2:41 pm

Byron,

I've been using the Microsoft Compiler for years now, with Harbour and FWH. I've never encountered that type of problem on any OS, from XP to the current 10. So I know it works fine, and the majority of my installs are using that build. For some very old people who have ADS 7 or 8, I never found code to allow that to work ( a change was made starting with ADS 9 ) for Harbour, so those people are on a build using xHarbour ( where I do have the right .libs ).

I haven't used Borland for many years. I do remember there were some issues in the .rc files that were different than what Microsoft supports in the OS, but aside from that I really have no clue about it.

As for the FWH version, you might find some benefits with the latest version. There always seems to be some useful new features many which my clients have appreciated.

Finally, I would personally suspect the new workstations. The new integrated graphics should handle anything short of gaming software. Were these namebrand computers or "custom" ? I'd also be curious why they updated a 2 year old Dell ? I have a Dell desktop about 4 years old that's working fine. I'd also make sure the display is properly installed in Windows Settings.

Of course I'd encourage anyone to work with the Microsoft tools since that will always be the most compatible with the OS ( which will constantly change ).

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
User avatar
TimStone
 
Posts: 2943
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Switching to Microsoft Compiler.

Postby Rick Lipkin » Thu Jul 26, 2018 2:51 pm

Byron

Here is the latest MSVC Build scrpit for the 2017 Command line tools from Microsoft ... you will need to modify your paths for FWH, MSVC compiler and xHarbourM

Code: Select all  Expand view

@ECHO OFF
CLS
ECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
ECHO ³ FiveWin for Harbour\xHarbour (MSVC2017++) May 2018                         ³Ü
ECHO ³ (c) FiveTech 1993-2018 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7/8/10 ³Û
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%


%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 -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

:FixThis

IF ERRORLEVEL 1 GOTO LINKERROR
ECHO * Application successfully built *
%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



You can goto xHarbour.org to get the MSVC 2017 Command line compiler:
http://xharbour.org/index.asp?page=down ... quired_win

and here for the matching xHarbour compiller:
http://xharbour.org/index.asp?page=down ... naries_win

If you use xMate I have the MSVC 2017 .env .. Let me know if you need any help!

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

Re: Switching to Microsoft Compiler.

Postby hmpaquito » Thu Jul 26, 2018 3:35 pm

For stability reasons on new OS, 1st buy last fwh version and perhaps I can help you on black browses.
hmpaquito
 
Posts: 1482
Joined: Thu Oct 30, 2008 2:37 pm

Re: Switching to Microsoft Compiler.

Postby TimStone » Thu Jul 26, 2018 9:26 pm

Byron, you're not far from me. If you wanted to bring the code on a usb drive, I could likely do a build with the Microsoft library, latest FWH, and Harbour. You could then see how that works. I'm in South Orange County ....
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: 2943
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Switching to Microsoft Compiler.

Postby fraxzi » Fri Jul 27, 2018 12:33 am

Rick Lipkin wrote:
...

If you use xMate I have the MSVC 2017 .env .. Let me know if you need any help!

Rick Lipkin


Mr. Rick,

Can you please share xMate's .env ms MSVC 2017 ... I'd like to try.

:wink:
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: Switching to Microsoft Compiler.

Postby Rick Lipkin » Fri Jul 27, 2018 12:55 pm

Frances

Here is the xMAte Environment for MSVC 2017 ..

Code: Select all  Expand view


[Environment]
Description 1=
Description 2=
Description 3=
PRG Compiler ver=xHarbour 10231
C compiler ver=MSVC 2017
Subsystem=FWH1707
Author=Richard Lipkin
Last update=05/19/2018

[Advanced]
Command types=1,1,1,1,1,1,1,1,1

[Harbour]
HB_INSTALL=C:\XHARBOURM
HB_COMMAND=%HB_BIN_INSTALL%\Harbour.Exe %PRG% /m /n /gc0 /w0 /es2 /a /i%HB_INC_INSTALL% /d__EXPORT__
Option prefix=/

[C]
C_INSTALL=C:\MSVC2017

C_COMP_COMMAND="%C_BIN_INSTALL%\cl.exe" -W3 -O2 -nologo -c -GA -GS -EHsc -I"%C_INC_INSTALL%" /I%HB_INC_INSTALL%   -Fo%OBJ% %C%
C_LIB_COMMAND=%C_BIN_INSTALL%\LIB.Exe /OUT:%LIB%  @%RSP% /LIST >%LST%
C_LINK_COMMAND=%C_BIN_INSTALL%\LINK.Exe /subsystem:WINDOWS /NODEFAULTLIB:LIBC /NODEFAULTLIB:MSVCRT /FORCE:MULTIPLE%CRLF% /LIBPATH:%C_LIB_INSTALL% @%LNK%
C_RC_COMMAND=%C_BIN_INSTALL%\RC.Exe -r  -fo%RES%  %RC%
C_DLL_COMMAND=
Option prefix=-

[User]
POSTEXE_COMMAND=
POSTLIB_COMMAND=
POSTDLL_COMMAND=

[Files]
%HB_LIB_INSTALL%\rtl.lib=1
%HB_LIB_INSTALL%\vm.lib=2
%HB_LIB_INSTALL%\gtgui.lib=3
%HB_LIB_INSTALL%\lang.lib=4
%HB_LIB_INSTALL%\macro.lib=5
%HB_LIB_INSTALL%\rdd.lib=6
%HB_LIB_INSTALL%\dbfntx.lib=7
%HB_LIB_INSTALL%\dbfcdx.lib=8
%HB_LIB_INSTALL%\dbffpt.lib=9
%HB_LIB_INSTALL%\hbsix.lib=10
%HB_LIB_INSTALL%\debug.lib=11
%HB_LIB_INSTALL%\common.lib=12
%HB_LIB_INSTALL%\pp.lib=13
%HB_LIB_INSTALL%\pcrepos.lib=14
%HB_LIB_INSTALL%\png.lib=15
%HB_LIB_INSTALL%\ct.lib=16
%HB_LIB_INSTALL%\zlib.lib=17
%HB_LIB_INSTALL%\HBMzip.lib=18
%HB_LIB_INSTALL%\HBzip.lib=19
c:\Fwh1707\lib\FivehMX.lib=20
c:\fwh1707\lib\FiveHc32.lib=21
%C_LIB_INSTALL%\kernel32.lib=22
%C_LIB_INSTALL%\user32.lib=23
%C_LIB_INSTALL%\gdi32.lib=24
%C_LIB_INSTALL%\winspool.lib=25
%C_LIB_INSTALL%\comctl32.lib=26
%C_LIB_INSTALL%\comdlg32.lib=27
%C_LIB_INSTALL%\advapi32.lib=28
%C_LIB_INSTALL%\shell32.lib=29
%C_LIB_INSTALL%\ole32.lib=30
%C_LIB_INSTALL%\oleaut32.lib=31
%C_LIB_INSTALL%\uuid.lib=32
%C_LIB_INSTALL%\odbc32.lib=33
%C_LIB_INSTALL%\odbccp32.lib=34
%C_LIB_INSTALL%\iphlpapi.lib=35
%C_LIB_INSTALL%\mpr.lib=36
%C_LIB_INSTALL%\version.lib=37
%C_LIB_INSTALL%\wsock32.lib=38
%C_LIB_INSTALL%\msimg32.lib=39
%C_LIB_INSTALL%\oledlg.lib=40
%C_LIB_INSTALL%\psapi.lib=41
%C_LIB_INSTALL%\gdiplus.lib=42
%C_LIB_INSTALL%\winmm.lib=43
%C_LIB_INSTALL%\libcmt.lib=44
%C_LIB_INSTALL%\oldnames.lib=45
%C_LIB_INSTALL%\libcpmt.lib=46
%C_LIB_INSTALL%\ws2_32.lib=47

 


Let me know if you have any problems with missing C++ header files as you compile .. I can help you with that too.

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

Re: Switching to Microsoft Compiler.

Postby fraxzi » Sat Jul 28, 2018 1:32 am

Hi Mr. Rick,

*.rh files are missing but I found it from "BCC73\INCLUDE\WINDOWS" folder so I just copied them to "VC2017\INCLUDE" folder.

but I got these error:

...

libucrt.lib(pow.obj) : warning LNK4006: __CIpow already defined in FiveHMX.lib(HARBOUR.obj); second definition ignored
rtl.lib(math.obj) : warning LNK4006: __matherr already defined in libcmt.lib(matherr.obj); second definition ignored
FiveHMX.lib(FWMARIA.obj) : error LNK2019: unresolved external symbol _hb_adler32 referenced in function _nxs_xorcyclic

...


I am using:


FWH1805\FiveHMX.lib
FWH1805\FiveHC32.lib
FWH1805\LibMariaDB32.lib



I am not sure if files from BCC73 can be used with VC2017.

:?:
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: Switching to Microsoft Compiler.

Postby Rick Lipkin » Sun Jul 29, 2018 5:27 pm

Francis

The .rh files will work from Borland ... I used then myself.

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

Re: Switching to Microsoft Compiler.

Postby fraxzi » Mon Jul 30, 2018 6:26 am

Rick Lipkin wrote:Francis

The .rh files will work from Borland ... I used then myself.

Rick Lipkin



Mr. I can't produce .EXE because of the error above.
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: Switching to Microsoft Compiler.

Postby Rick Lipkin » Mon Jul 30, 2018 12:39 pm

Francis

There are the four .rh files I needed to make MSVC 2017 work:

commctrl.rh
dde.rh
winnt.rh
winuser.rh

Also, make sure you are using the latest xHarbour for MSVC 2017

Give me your e-mail address and I will send them to you ..

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

Re: Switching to Microsoft Compiler.

Postby fraxzi » Thu Aug 02, 2018 1:55 am

Rick Lipkin wrote:Francis

There are the four .rh files I needed to make MSVC 2017 work:

commctrl.rh
dde.rh
winnt.rh
winuser.rh

Also, make sure you are using the latest xHarbour for MSVC 2017

Give me your e-mail address and I will send them to you ..

Rick Lipkin


Mr. Rick,

Sorry for the late reply, I kinda hooked with xBrowse Tree issue ... anyway, please send with my personal email: padillayen at gmail dot com.

:wink:
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 29 guests

cron