Buenas tardes,
Con sus comentarios y a base de prueba y error he conseguido montar un fichero .hbp para tratar de usar hbmk2.exe pero parece que
no puedo compilar el fichero de recursos.
El compilador es el de MSVC 64 bits y las versiones de FW y Harbour son las últimas que nos ha mandado Antonio con el curso.
Nota:
1.- el exe lo puedo generar bien usando el buildh64.bat con unos añadidos para librerías necesarias.
2.- el fichero de recursos los genero con Pelles C 12.
go64.bat
Code: Select all | Expand
@setlocal
if "%FWDIR%" == "" set FWDIR=C:\fwh64bis
if "%HBDIR%" == "" set HBDIR=C:\harbour_msvc2022_64_20240814
@set path=%path%;C:\harbour_msvc2022_64_20240814\lib\win\msvc64;C:\harbour_msvc2022_64_20240814\include
if exist "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
set hdir=%HBDIR%
set hdirl=%HBDIR%\lib\win\msvc64
@cd %current_dir%
ECHO ***** Compiling with Harbour 64 bytes...
C:\harbour64_MVSC_2022\bin\win\msvc64\hbmk2 %1.hbp -comp=msvc64
@endlocal
wges.hbp
Code: Select all | Expand
-gui
-mt
#FICHEROS FUENTE:
wges.prg
wges.rc
-optim-
-ldflag+=-aa
-lcflag=-r
-lcflag=-D__64__
-lcflag=-TC
-lcflag=-W3
-lcflag=-O2
-lcflag=-c
#INCLUDES DE FW:
-Ic:\fwh64bis\include
#LIBRERÍAS DE FW:
-Lc:\fwh64bis\lib
-lFiveH64
-lFiveHC64
#LIBRERÍAS HARBOUR (añade las cabeceras .hbc):
xhb.hbc
hbct.hbc
hbwin.hbc
hbmzip.hbc
hbziparc.hbc
hbhpdf.hbc
hbcomm.hbc
hbmxml.hbc
#LIBRERÍAS DE MVSC (las .lib y las cabeceras):
-L"C:\Program Files (x86)\Windows Kits\"10\Lib\10.0.22621.0\ucrt\x64
-L"C:\Program Files (x86)\Windows Kits"\10\Lib\10.0.22621.0\um\x64
-I"C:\Program Files (x86)\Windows Kits\"10\Include\10.0.22621.0\ucrt
-I"C:\Program Files (x86)\Windows Kits"\10\Include\10.0.22621.0\um
-lUxTheme
-lwininet
-lurlmon
#GENERA UN FICHERO SIN DEPENDENCIAS:
-ldflag=/NODEFAULTLIB:msvcrt
-ldflag+=/NODEFAULTLIB:libucrt
#NOMBRE DEL FICHERO EXE DE SALIDA:
-owges_64
Errores:
Code: Select all | Expand
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.2.5
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
c:\CLIWIN\FW
***** Compiling with Harbour 64 bytes...
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
Compiling 'wges.prg'...
Lines 62146, Functions/Procedures 689
Generating C source output to 'C:\Users\santi\AppData\Local\Temp\hbmk_y8qrrk.dir\wges.c'... Done.
Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384
Copyright (C) Microsoft Corporation. All rights reserved.
fatal error RC1107: invalid usage; use RC /? for Help
hbmk2[wges]: Error: Ejecución de compilador de recursos. 1
rc.exe -IC:\harbour64_MVSC_2022\include -Ic:\fwh64bis\include -IC:\harbour64_MVSC_2022\contrib\xhb -IC:\harbour64_MVSC_2022\contrib\hbct -IC:\harbour64_MVSC_2022\contrib\hbtip -IC:\harbour64_MVSC_2022\contrib\hbfship -IC:\harbour64_MVSC_2022\contrib\hbxpp -IC:\harbour64_MVSC_2022\contrib\hbwin -IC:\harbour64_MVSC_2022\contrib\hbmzip -IC:\harbour64_MVSC_2022\contrib\hbhpdf -IC:\harbour64_MVSC_2022\contrib\hbcomm -IC:\harbour64_MVSC_2022\contrib\hbmxml -I""C:\Program Files (x86)\Windows Kits\"10\Include\10.0.22621.0\ucrt" -I""C:\Program Files (x86)\Windows Kits"\10\Include\10.0.22621.0\um" -fo C:\Users\santi\AppData\Local\Temp\hbmk_y8qrrk.dir\wges.res wges.rc
No se encuentra el archivo: wges_64.exe
Copio también el buildh64.bat con el que si se genera el ejecutable:
Code: Select all | Expand
@ECHO OFF
CLS
ECHO 旼컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴커
ECHO ?FWH 64 for Harbour 24.07 (VS64bits) Jul. 2024 Harbour development power 넵
ECHO ?(c) FiveTech 1993-2024 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
@set oldpath=%Path%
@set oldinclude=%include%
@set oldlib=%lib%
@set oldlibpath=%libpath%
@set current_dir=%cd%
setlocal
@set path=%path%;C:\harbour_msvc2022_64_20240814\lib\win\msvc64;C:\harbour_msvc2022_64_20240814\include
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
if "%FWDIR%" == "" set FWDIR=C:\fwh64bis
if "%HBDIR%" == "" set HBDIR=C:\harbour_msvc2022_64_20240814
ECHO Compiling...
set hdir=%HBDIR%
set hdirl=%hdir%\lib\win\msvc64
@cd %current_dir%
%hdir%\bin\win\msvc64\harbour %1 /n /i%FWDIR%\include;%hdir%\include /p /d__64__ /d__NODEBUG__ %2 %3 > comp.log 2> warnings.log
IF ERRORLEVEL 1 GOTO COMPILEERROR
@type comp.log
@type warnings.log
rem cl -TC -W3 -O2 -c -I%hdir%\include -D_WIN64 -D__FLAT__ -I%fwdir%\include -I"%ProgramFiles(x86)%\Windows Kits"\10\Include\10.0.18362.0\ucrt %1.c
cl -D__64__ -TC -W3 -O2 -c -I%hdir%\include -D_WIN64 -D__FLAT__ -I%fwdir%\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 %fwdir%\lib\libmariadb64.lib >> msvc.tmp
rem echo %fwdir%\lib\drxlsx64.lib >> msvc.tmp
rem echo %fwdir%\lib\xlsxlibhbmsvc64.lib >> msvc.tmp
echo %fwdir%\lib\hbhpdf64.lib >> msvc.tmp
echo %fwdir%\lib\libhpdf64.lib >> msvc.tmp
echo %hdirl%\hbrtl.lib >> msvc.tmp
echo %hdirl%\hbvm.lib >> msvc.tmp
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
echo %hdirl%\hbtip.lib >> msvc.tmp
echo %hdirl%\hbzebra.lib >> msvc.tmp
echo %hdirl%\hbcurl.lib >> msvc.tmp
echo %hdirl%\libcurl.lib >> msvc.tmp
echo %hdirl%\hbcomm.lib >> msvc.tmp
echo %hdirl%\hbmxml.lib >> msvc.tmp
echo %hdirl%\mxml.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 vfw32.lib >> msvc.tmp
echo ws2_32.lib >> msvc.tmp
echo strmiids.lib >> msvc.tmp
echo ucrt.lib >> msvc.tmp
echo UxTheme.lib >> msvc.tmp
echo wininet.lib >> msvc.tmp
echo urlmon.lib >> msvc.tmp
IF EXIST %1.res echo %1.res >> msvc.tmp
link @msvc.tmp /nologo /subsystem:windows /NODEFAULTLIB:libucrt /NODEFAULTLIB:msvcrt
rem /force:multiple
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=
endlocal
%1
GOTO EXIT
ECHO
rem delete temporary files
@del %1.c
@del msvc.tmp
: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