[Google Traductor]
Hi good day
The PRG code that I paste below, works well on my PC putting the minGW compiler folder in the path, (in my case c:\hb32\comp\mingw\bin) through the following command:
SET PATH=c:\hb32\comp\mingw\bin;% PATH%
When I take it to another PC, it asks me for a list of DLL's, which I copy from c:\hb32\comp\mingw\bin to the folder where the EXE is, but when I run it, it gives me the following message:
. . .
Press any key to continue ...
Problem with the SSL CA cert (path? Access rights?)
Press any key to continue ...
. . .
The DLLs that it asks me are:
libbrotlicommon.dll
libbrotlidec.dll
libcrypto-1_1.dll
libcurl-4.dll
libgcc_s_dw2-1.dll
libiconv-2.dll
libidn2-0.dll
libintl-8.dll
libnghttp2-14.dll
libpsl-5.dll
libssl-1_1.dll
libunistring-2.dll
libwinpthread-1.dll
zlib1.dll
How can I run the EXE on the target PC without having to install Harbor?
Is there a way to make a self-contained EXE?
Thank you very much in advance for your help.
. . . . Code.prg
#require "hbcurl"
FUNCTION Main
LOCAL hCurl, cToken, cRuc, hHash, aHeader := {}, cRpta
cToken := "apis-token-583.IffknbAo0LGsYLyKGWIUmz7290F70vsK"
cRuc := "20525754783"
AADD( aHeader, 'Accept: application/json' )
AADD( aHeader, 'Authorization: Bearer ' + cToken )
setmode( 25, 80 )
wait
// curl_global_init( HB_CURL_GLOBAL_ALL )
IF ! empty( hCurl := curl_easy_init() )
curl_easy_setopt( hCurl, HB_CURLOPT_HTTPHEADER, aHeader )
curl_easy_setopt( hCurl, HB_CURLOPT_DOWNLOAD )
curl_easy_setopt( hCurl, HB_CURLOPT_DL_BUFF_SETUP )
curlErr := curl_easy_perform( hCurl )
IF empty( curlErr )
cRpta := curl_easy_dl_buff_get( hCurl )
? cRpta
hb_jsonDecode( curl_easy_dl_buff_get( hCurl ), @hHash )
ELSE
? curl_easy_strerror(curlErr)
endif
curl_easy_reset( hCurl )
hCurl := NIL
ELSE
Alert( "Falló comando " + "!empty( hCurl := curl_easy_init() )" )
ENDIF
wait
// curl_global_cleanup( hCurl )
RETURN NIL
. . . .
[SPANISH]
Problema con CURL y DLL's
Hola, buen día
El código PRG que pego mas abajo, funciona bien en mi PC poniendo en la ruta la carpeta del compilador minGW, (en mi caso c:\hb32\comp\mingw\bin) a traves del siguiente comando:
SET PATH=c:\hb32\comp\mingw\bin;%PATH%
Cuando lo llevo a otra PC me pide una relación de DLL's, la cual copio desde c:\hb32\comp\mingw\bin hacia la carpeta donde está el EXE, pero al ejecutarlo me da el siguiente mensaje:
. . .
Press any key to continue...
Problem with the SSL CA cert (path? access rights?)
Press any key to continue...
. . .
Los DLL que me pide son:
libbrotlicommon.dll
libbrotlidec.dll
libcrypto-1_1.dll
libcurl-4.dll
libgcc_s_dw2-1.dll
libiconv-2.dll
libidn2-0.dll
libintl-8.dll
libnghttp2-14.dll
libpsl-5.dll
libssl-1_1.dll
libunistring-2.dll
libwinpthread-1.dll
zlib1.dll
¿Cómo puedo hacer para ejecutar el EXE el la PC destino sin tener que instalar Harbour?
¿Hay alguna forma de hacer un EXE autocontenido?
De antemano muchas gracias por su ayuda.
GVARONAS