Copio las referencias en mi programa y el .bat para compilar.
El bat para compilar es:
- Code: Select all Expand view RUN
- @ECHO OFF
CLS
ECHO 旼컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴커
ECHO ?FWH 64 for Harbour 14.08 (MSVC++) Ago.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? Verhoven 08/04/2016 넴
ECHO ? MS Visual Studio Comunity 2013 para 64 Bits 넴
ECHO ? 넴
ECHO ? Carpetas de la instalaci? 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 ? MULTIHILOS 넴
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%
if exist "%ProgramFiles%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" call "%ProgramFiles%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86_amd64
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
echo %fwdir%\lib\FiveH64.lib %fwdir%\lib\FiveHC64.lib >> msvc.tmp
echo %hdirl%\hbrtl.lib >> msvc.tmp
REM echo %hdirl%\hbvm.lib >> msvc.tmp SIN MULTIHILOS
echo %hdirl%\hbvmmt.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
rem echo %hdir%\lib\hbcomm.lib >> msvc.tmp
echo %hdirl%\hbcomm.lib >> msvc.tmp
echo %hdirl%\hbmxml.lib >> msvc.tmp
echo %hdirl%\mxml.lib >> msvc.tmp
rem echo %hdirl%\mxml1.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? PRG
ECHO {-- Don't specify .PRG extension
GOTO EXIT
:NOEXIST
ECHO The specified PRG %1 does not exist
:EXIT
rem delete temporary files
@del %1.res
Las llamadas a los archivos de cabecera en los prg (en una parte hecha en C) son:
- Code: Select all Expand view RUN
- #pragma BEGINDUMP
// Para compilar con Borland BCC582, BCC63 y para VSC2013.
#include "warningsVSC2013.h"
#include <ws2tcpip.h> //For WinSock 2 library: ws2_32.lib
#include <wininet.h>
#include <windows.h>
#include "hbapi.h"
#include <stdio.h>
#include "WinBase.h"
// Es necesario poner el prototipo para poder usar hb_fopen():
FILE * hb_fopen( const char * path, const char * mode );
HB_FUNC( INTERNETOPEN )
{
hb_retnl( ( LONG ) InternetOpen( hb_parc( 1 ), hb_parnl( 2 ), hb_parc( 3 ), hb_parc( 4 ), hb_parnl( 5 ) ) );
}
#pragma ENDDUMP
Y el resultado del intento de compilación es el siguiente:
- Code: Select all Expand view RUN
- Compiling...
Harbour 3.2.0dev (r1412151448)
Copyright (c) 1999-2014, http://harbour-project.org/
Compiling 'wintpv.prg' and generating preprocessed output to 'wintpv.ppo'...
Lines 68327, Functions/Procedures 865
Generating C source output to 'wintpv.c'... Done.
Compilador de optimización de C/C++ de Microsoft (R) versión 18.00.21005.1 para x64
(C) Microsoft Corporation. Reservados todos los derechos.
wintpv.c
internet.prg(404) : fatal error C1083: No se puede abrir el archivo incluir: 'ws2tcpip.h': No such file or directory
Microsoft (R) Windows (R) Resource Compiler Version 6.3.9600.16384
Copyright (C) Microsoft Corporation. All rights reserved.
wintpv.RC(4) : fatal error RC1015: cannot open include file 'commctrl.h'.
LINK : fatal error LNK1181: no se puede abrir el archivo de entrada 'wintpv.obj'
* Linking errors *
No se pudo encontrar c:\CLIWIN\FW\wintpv.res