FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour MSVC 2017 Try
Posts: 563
Joined: Sun Oct 09, 2005 07:23 PM
Re: MSVC 2017 Try
Posted: Mon Apr 10, 2017 10:14 AM
With this bat to compile and link:
Code (fw): Select all Collapse
@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 (fw): Select all Collapse
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 *
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: MSVC 2017 Try
Posted: Mon Apr 10, 2017 11:07 AM

What Visual Studio version are you using ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 563
Joined: Sun Oct 09, 2005 07:23 PM
Re: MSVC 2017 Try
Posted: Mon Apr 10, 2017 01:45 PM

Community 2017. Downloaded today.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: MSVC 2017 Try
Posted: Mon Apr 10, 2017 05:51 PM

I proposed a fix for __iob_func:

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

you may try it

&

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 563
Joined: Sun Oct 09, 2005 07:23 PM
Re: MSVC 2017 Try
Posted: Mon Apr 10, 2017 06:50 PM

Ok. I will try this. But still remains
another error with: _vacopy

Posts: 563
Joined: Sun Oct 09, 2005 07:23 PM
Re: MSVC 2017 Try
Posted: Tue Apr 11, 2017 07:14 AM
The compiler sends the next error:

Code (fw): Select all Collapse
[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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: MSVC 2017 Try
Posted: Tue Apr 11, 2017 07:34 AM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 563
Joined: Sun Oct 09, 2005 07:23 PM
Re: MSVC 2017 Try
Posted: Wed Apr 12, 2017 01:28 PM

The harbour (r1412151448) fails:
compiling errors

But do not say any more details.

Posts: 563
Joined: Sun Oct 09, 2005 07:23 PM
Re: MSVC 2017 Try
Posted: Wed Apr 12, 2017 01:49 PM

Last problem commented few minutes later was solved, but still have the problem with the previous issues posted yesterday.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: MSVC 2017 Try
Posted: Wed Apr 12, 2017 04: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
Posts: 563
Joined: Sun Oct 09, 2005 07:23 PM
Re: MSVC 2017 Try
Posted: Wed Apr 12, 2017 05: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.

Posts: 563
Joined: Sun Oct 09, 2005 07:23 PM
Re: MSVC 2017 Try
Posted: Wed Apr 12, 2017 05: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"

Posts: 563
Joined: Sun Oct 09, 2005 07:23 PM
Re: MSVC 2017 Try
Posted: Wed Apr 12, 2017 05:52 PM

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

From the MVSC2017 compiler.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: MSVC 2017 Try
Posted: Thu Apr 13, 2017 07: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
Posts: 563
Joined: Sun Oct 09, 2005 07:23 PM
Re: MSVC 2017 Try
Posted: Thu Apr 13, 2017 08:44 AM

That line is only:
extern "C" {

Another issue is that when I change in the compiler -TC by -TP the the previous error gey solved but the number of other new errors increases, like this:

1.-
no se puede realizar la conversión de 'char *' a 'unsigned char'
la operación requiere reinterpret_cast, conversión de estilo de C o conversión de estilo de función.

2.-
'int_sprintf(char const, const char const, ...)': el argumento 1 no puede convertirse de 'unsigned char [8]' a 'char *const'

3.-
hbapifs.h(454): error C2732: la especificación de vinculación se contradice con la especificación anterior para 'hb_fopen'