MSVC 2017 Try

Re: MSVC 2017 Try

Postby TimStone » Fri Apr 07, 2017 4:35 pm

Good Morning,

I did want to report that I downloaded MS Visual Studio 2017 Community ( full package ) to my laptop. I then used it to build my "solution" created on my main machine with MSVS 2015. I ran the CLEAN utility and did a complete rebuild. It automatically prompted me, and updated the referenced libraries with MSVC.

I am still using the older Harbour builds made with VS 2015. The main reason is that Antonio made a few extra .libs to use with it that were Harbour source, but not in the normal .lib folder.

The program works fine with the older Harbour libraries. There are no build problems, nor are there any operational errors when running the program.

In time, I will update the Harbour libraries. I have retained MSVC 2015 plus the older libs on my production builds for now. I have too many developing features to change that at this moment.

For those considering MSVC plus Harbour, I will encourage you to move in that direction. The 2015 version was continually updated until early 2017 when the new version was released. My clients who use the application built with it find it to be smoother and faster than the copy built with xHarbour ( .com version ), and we are able to support more features ( like taking photos from within the application ). Since Visual Studio Community edition is full featured, and FREE ... it might be worth consideration. Also, it builds great in both 32 bit and 64 bit versions of FWH / Harbour ....

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: 2904
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: MSVC 2017 Try

Postby Verhoven » Mon Apr 10, 2017 10:14 am

With this bat to compile and link:
Code: Select all  Expand view
@ECHO OFF
CLS
ECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
ECHO ³ FWH 64 for Harbour 14.07 (MSVC++) Jul.2014       Harbour development power ³Ü
ECHO ³ (c) FiveTech, 1993-2014   for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7/8 ³Û
ECHO ³                                                 W-10                       ³Û
ECHO ³                      Modificación Verhoven 08/04/2016                      ³Û
ECHO ³                MS Visual Studio Comunity 2013 para 64 Bits                 ³Û
ECHO ³     Incluye llamada al Browse de Hernan compilado también para 64 Bits.    ³Û
ECHO ³                                                                            ³Û
ECHO ³     Carpetas de la instalación para que funcione este bat:                 ³Û
ECHO ³             FWH 64:      C:\FWH64                                          ³Û
ECHO ³             Harbour 64:  C:\harbour64                                      ³Û
ECHO ³             VSC 2013:    En la que instala por defecto                     ³Û
ECHO ³                                                                            ³Û
ECHO ³     Aplicado el .bat sobre MIPROG.PRG genera MIPROG_64.EXE                 ³Û
ECHO ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ
ECHO ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

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

@set oldpath=%path%
@set oldinclude=%include%
@set oldlib=%lib%
@set oldlibpath=%libpath%

rem **** Version 2017
 set HB_WITH_OPENSSL=c:\OpenSSL-Win32\include
 if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
rem **** Version 2017 FIN

rem if exist "%ProgramFiles%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" call "%ProgramFiles%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86_amd64
rem if exist "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" call "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86_amd64

rem if "%FWDIR%" == "" set FWDIR=.\..
if "%FWDIR%" == "" set FWDIR=C:\FWH64
if "%HBDIR%" == "" set HBDIR=C:\harbour64

if "%FWDIR%" == "C:\fwh" set FWDIR=C:\FWH64
if "%HBDIR%" == "C:\harbour" set HBDIR=C:\harbour64

ECHO Compiling...

set hdir=%HBDIR%
rem set hdirl=%hdir%\lib\vc64
set hdirl=%hdir%\lib

%hdir%\bin\harbour %1 /n /i%fwdir%\include;%hdir%\include /p /d__64__ %2 %3 > comp.log 2> warnings.log
IF ERRORLEVEL 1 GOTO COMPILEERROR
@type comp.log
@type warnings.log

cl -TC -W3 -O2 -c -I%hdir%\include %1.c
:ENDCOMPILE

IF EXIST %1.rc rc -r -D__64__ %1

echo %1.obj  > msvc.tmp

rem TBROWSE DE HERNAN:
rem ­ Hay que poner delante las que sustituyen a las de FW, o mejor dicho
rem    el enlazador pone en el exe las que primero encuentra !
echo C:\CLIWIN\TBROWSE17b\LIB\TWBRWX64_H.lib >> msvc.tmp


echo %fwdir%\lib\FiveH64.lib %fwdir%\lib\FiveHC64.lib  >> msvc.tmp

echo %hdirl%\hbrtl.lib  >> msvc.tmp
echo %hdirl%\hbvm.lib  >> msvc.tmp
echo %hdirl%\gtgui.lib  >> msvc.tmp
echo %hdirl%\hblang.lib  >> msvc.tmp
echo %hdirl%\hbmacro.lib  >> msvc.tmp
echo %hdirl%\hbrdd.lib  >> msvc.tmp
echo %hdirl%\rddntx.lib  >> msvc.tmp
echo %hdirl%\rddcdx.lib  >> msvc.tmp
echo %hdirl%\rddfpt.lib  >> msvc.tmp
echo %hdirl%\hbsix.lib  >> msvc.tmp
echo %hdirl%\hbdebug.lib  >> msvc.tmp
echo %hdirl%\hbcommon.lib  >> msvc.tmp
echo %hdirl%\hbpp.lib  >> msvc.tmp
echo %hdirl%\hbcpage.lib  >> msvc.tmp
echo %hdirl%\hbwin.lib  >> msvc.tmp
echo %hdirl%\hbct.lib  >> msvc.tmp
echo %hdirl%\hbziparc.lib >> msvc.tmp
echo %hdirl%\hbmzip.lib >> msvc.tmp
echo %hdirl%\hbzlib.lib >> msvc.tmp
echo %hdirl%\hbpcre.lib >> msvc.tmp
echo %hdirl%\minizip.lib >> msvc.tmp
echo %hdirl%\xhb.lib >> msvc.tmp
echo %hdirl%\hbcplr.lib >> msvc.tmp
echo %hdirl%\png.lib >> msvc.tmp

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

rem Uncomment these two lines to use Advantage RDD
rem echo %hdirl%\rddads.lib >> msvc.tmp
rem echo %hdirl%\ace32.lib >> msvc.tmp

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

echo wininet.lib  >> msvc.tmp
echo ws2_32.lib  >> msvc.tmp
echo urlmon.lib  >> msvc.tmp

rem echo %ProgramFiles%(x86)\Microsoft SDKs\Windows\v7.1A\Lib\x64\wininet.lib  >> msvc.tmp
rem echo %ProgramFiles%(x86)\Microsoft SDKs\Windows\v7.1A\Lib\x64\ws2_32.lib  >> msvc.tmp

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

rem link @msvc.tmp /nologo /subsystem:windows /force:multiple /NODEFAULTLIB:libc
link @msvc.tmp /nologo /subsystem:windows /NODEFAULTLIB:libc /OUT:%1_64.EXE

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=

rem delete temporary files
@del %1.c
@del %1.obj
@del %1.ppo
@del msvc.tmp
@del comp.log
@del warnings.log
%1_64.EXE
GOTO EXIT
ECHO

:COMPILEERROR
@type comp.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



I´ve got the next errors:

Code: Select all  Expand view
internet.prg(387): warning C4311: 'conversi¢n de tipo': truncamiento de puntero de 'HINTERNET' a 'LONG'
internet.prg(393): warning C4312: 'conversi¢n de tipo': conversi¢n de 'long' a 'HINTERNET' de mayor tama¤o
internet.prg(399): warning C4312: 'conversi¢n de tipo': conversi¢n de 'long' a 'HINTERNET' de mayor tama¤o
internet.prg(399): warning C4311: 'conversi¢n de tipo': truncamiento de puntero de 'HINTERNET' a 'LONG'
internet.prg(406): warning C4312: 'conversi¢n de tipo': conversi¢n de 'long' a 'HINTERNET' de mayor tama¤o
internet.prg(406): warning C4311: 'conversi¢n de tipo': truncamiento de puntero de 'HINTERNET' a 'LONG'
internet.prg(414): warning C4312: 'conversi¢n de tipo': conversi¢n de 'long' a 'HINTERNET' de mayor tama¤o
internet.prg(422): warning C4312: 'conversi¢n de tipo': conversi¢n de 'long' a 'HINTERNET' de mayor tama¤o
internet.prg(434): warning C4312: 'conversi¢n de tipo': conversi¢n de 'long' a 'HINTERNET' de mayor tama¤o
internet.prg(441): warning C4312: 'conversi¢n de tipo': conversi¢n de 'long' a 'HINTERNET' de mayor tama¤o
internet.prg(441): warning C4311: 'conversi¢n de tipo': truncamiento de puntero de 'HINTERNET' a 'LONG'
internet.prg(446): warning C4312: 'conversi¢n de tipo': conversi¢n de 'long' a 'HINTERNET' de mayor tama¤o
internet.prg(466): warning C4312: 'conversi¢n de tipo': conversi¢n de 'long' a 'HINTERNET' de mayor tama¤o
internet.prg(533): warning C4312: 'conversi¢n de tipo': conversi¢n de 'long' a 'HINTERNET' de mayor tama¤o
internet.prg(592): warning C4312: 'conversi¢n de tipo': conversi¢n de 'long' a 'HINTERNET' de mayor tama¤o
Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384

Copyright (C) Microsoft Corporation.  All rights reserved.


hbpp.lib(ppcore.obj) : error LNK2001: símbolo externo __iob_func sin resolver
FiveH64.lib(HARBOUR.obj) : error LNK2001: símbolo externo __iob_func sin resolver
hbvm.lib(hvmall.obj) : error LNK2001: símbolo externo __iob_func sin resolver
rddcdx.lib(dbfcdx1.obj) : error LNK2001: símbolo externo __iob_func sin resolver
hbcplr.lib(hbcomp.obj) : error LNK2001: símbolo externo __iob_func sin resolver
hbcommon.lib(hbprintf.obj) : error LNK2019: símbolo externo _vacopy sin resolver al que se hace referencia en la función hb_vsnprintf
wintpv_64.EXE : fatal error LNK1120: 2 externos sin resolver
* Linking errors *
Verhoven
 
Posts: 505
Joined: Sun Oct 09, 2005 7:23 pm

Re: MSVC 2017 Try

Postby Antonio Linares » Mon Apr 10, 2017 11:07 am

What Visual Studio version are you using ?
regards, saludos

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

Re: MSVC 2017 Try

Postby Verhoven » Mon Apr 10, 2017 1:45 pm

Community 2017. Downloaded today.
Verhoven
 
Posts: 505
Joined: Sun Oct 09, 2005 7:23 pm

Re: MSVC 2017 Try

Postby Antonio Linares » Mon Apr 10, 2017 5:51 pm

I proposed a fix for __iob_func:

viewtopic.php?p=189028&sid=817abac0dd70a7988052fc5cb38da0bd#p189028

you may try it
regards, saludos

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

Re: MSVC 2017 Try

Postby Verhoven » Mon Apr 10, 2017 6:50 pm

Ok. I will try this. But still remains
another error with: _vacopy
Verhoven
 
Posts: 505
Joined: Sun Oct 09, 2005 7:23 pm

Re: MSVC 2017 Try

Postby Verhoven » Tue Apr 11, 2017 7:14 am

The compiler sends the next error:

Code: Select all  Expand view
[b]miprg.prg(19650): error C2059: error de sintaxis: 'cadena'[/b]
Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384

Copyright (C) Microsoft Corporation.  All rights reserved.


hbpp.lib(ppcore.obj) : error LNK2001: símbolo externo __iob_func sin resolver
FiveH64.lib(HARBOUR.obj) : error LNK2001: símbolo externo __iob_func sin resolver
hbvm.lib(hvmall.obj) : error LNK2001: símbolo externo __iob_func sin resolver
rddcdx.lib(dbfcdx1.obj) : error LNK2001: símbolo externo __iob_func sin resolver
hbcplr.lib(hbcomp.obj) : error LNK2001: símbolo externo __iob_func sin resolver
hbcommon.lib(hbprintf.obj) : error LNK2019: símbolo externo _vacopy sin resolver al que se hace referencia en la función hb_vsnprintf
Verhoven
 
Posts: 505
Joined: Sun Oct 09, 2005 7:23 pm

Re: MSVC 2017 Try

Postby Antonio Linares » Tue Apr 11, 2017 7:34 am

regards, saludos

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

Re: MSVC 2017 Try

Postby Verhoven » Wed Apr 12, 2017 1:28 pm

The harbour (r1412151448) fails:
*compiling errors*

But do not say any more details.
Verhoven
 
Posts: 505
Joined: Sun Oct 09, 2005 7:23 pm

Re: MSVC 2017 Try

Postby Verhoven » Wed Apr 12, 2017 1:49 pm

Last problem commented few minutes later was solved, but still have the problem with the previous issues posted yesterday.
Verhoven
 
Posts: 505
Joined: Sun Oct 09, 2005 7:23 pm

Re: MSVC 2017 Try

Postby Antonio Linares » Wed Apr 12, 2017 4:23 pm

Current Harbour is:

Harbour 3.2.0dev (r1703231115)

and you are using r1412151448

Please use this Harbour:
https://bitbucket.org/fivetech/harbour-xharbour-builds/downloads/Harbour_vsc2017_64bits_20170325.zip
regards, saludos

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

Re: MSVC 2017 Try

Postby Verhoven » Wed Apr 12, 2017 5:34 pm

I have tried this last version of Harbour and still have the same link errors noticed.
I don't know what to do.
Verhoven
 
Posts: 505
Joined: Sun Oct 09, 2005 7:23 pm

Re: MSVC 2017 Try

Postby Verhoven » Wed Apr 12, 2017 5:46 pm

And when i try the C code you told me the compiler give one error.
The line the compiler don't like is this one: extern "C"
Verhoven
 
Posts: 505
Joined: Sun Oct 09, 2005 7:23 pm

Re: MSVC 2017 Try

Postby Verhoven » Wed Apr 12, 2017 5:52 pm

The error is:
error C2059: error de sintaxis: 'cadena'

From the MVSC2017 compiler.
Verhoven
 
Posts: 505
Joined: Sun Oct 09, 2005 7:23 pm

Re: MSVC 2017 Try

Postby Antonio Linares » Thu Apr 13, 2017 7:30 am

And when i try the C code you told me the compiler give one error.
The line the compiler don't like is this one: extern "C"


You have to compile it using C++ mode.

Use this C compiler flag: -TP

The error is:
error C2059: error de sintaxis: 'cadena'


miprg.prg(19650): error C2059: error de sintaxis: 'cadena'

Please copy here the line 19650 of miprg.prg
regards, saludos

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

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 97 guests