Page 5 of 6
Re: De *.C Para *.Obj en BCC74 no funciona más.
Posted: Sat Nov 18, 2023 2:47 pm
by karinha
Enrico Maria Giordano wrote:hbcurl.lib, but I don't know how to use it, sorry.
Enrico, there is a .LIB or .CH missing for xHarbour.
Enrico, falta un .LIB o .CH para xHarbour.
Code: Select all | Expand
Embarcadero C++ 7.70 for Win32 Copyright (c) 1993-2023 Embarcadero Technologies, Inc.
FWHCURL.c:
Turbo Incremental Link 6.97 Copyright (c) 1997-2022 Embarcadero Technologies, Inc.
Error: Unresolved external '_curl_global_init_mem' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_global_cleanup' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_formfree' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_cleanup' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_reset' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_duphandle' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_init' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_pause' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_perform' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_send' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_recv' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_formadd' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_slist_append' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_setopt' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_getinfo' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_slist_free_all' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_escape' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_unescape' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_version' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_version_info' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_strerror' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_getdate' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_escape' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_unescape' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_free' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unable to perform link
* Linking errors *
Regards, saludos.
Re: De *.C Para *.Obj en BCC74 no funciona más.
Posted: Sat Nov 18, 2023 2:54 pm
by Enrico Maria Giordano
Can I see the source code you are trying to compile, please?
Re: De *.C Para *.Obj en BCC74 no funciona más.
Posted: Sat Nov 18, 2023 3:08 pm
by karinha
Enrico Maria Giordano wrote:Can I see the source code you are trying to compile, please?
Code: Select all | Expand
// C:\FWH\SAMPLES\FWHCURL.PRG
#include "FiveWin.ch"
#include "fileio.ch"
#include "C:\XHBBCC74\contrib\hbcurl\hbcurl.ch"
FUNCTION Main()
curl_global_init()
? "Hello world"
? callPHP( "www.fivetechsoft.com/getip.php" )
curl_global_cleanup()
RETURN NIL
FUNCTION callPHP( cUrl )
LOCAL hCurl, uValue
IF .NOT. Empty( hCurl := curl_easy_init() )
curl_easy_setopt( hCurl, HB_CURLOPT_URL, cUrl )
curl_easy_setopt( hCurl, HB_CURLOPT_DL_BUFF_SETUP )
IF curl_easy_perform( hCurl ) == 0
uValue = curl_easy_dl_buff_get( hCurl )
ENDIF
ENDIF
RETURN uValue
// fin / end
Regards, saludos.
Re: De *.C Para *.Obj en BCC74 no funciona más.
Posted: Sat Nov 18, 2023 3:29 pm
by Enrico Maria Giordano
Thank you. You have to generate libcurl.lib from
And then link both hbcurl.lib and libcurl.lib to your EXE. And put libcurl.dll in the same directory of your EXE or in the windows\system directory.
Re: De *.C Para *.Obj en BCC74 no funciona más.
Posted: Sat Nov 18, 2023 4:08 pm
by Enrico Maria Giordano
If you need all the required files just ask me.
Re: De *.C Para *.Obj en BCC74 no funciona más.
Posted: Sat Nov 18, 2023 6:52 pm
by Enrico Maria Giordano
There is no FWHCURL.PRG in FWH. Anyway, this is the correct and working sample:
Code: Select all | Expand
#include "Fivewin.ch"
#include "Hbcurl.ch"
FUNCTION MAIN()
CURL_GLOBAL_INIT()
? CALLPHP( "https://www.fivetechsoft.com/getip.php" )
CURL_GLOBAL_CLEANUP()
RETURN NIL
FUNCTION CALLPHP( cUrl )
LOCAL hCurl, cRet
hCurl = CURL_EASY_INIT()
IF !EMPTY( cUrl )
CURL_EASY_SETOPT( hCurl, HB_CURLOPT_URL, cUrl )
CURL_EASY_SETOPT( hCurl, HB_CURLOPT_DL_BUFF_SETUP )
CURL_EASY_SETOPT( hCurl, HB_CURLOPT_SSL_VERIFYPEER, 0 )
IF CURL_EASY_PERFORM( hCurl ) = 0
cRet = CURL_EASY_DL_BUFF_GET( hCurl )
ENDIF
CURL_EASY_CLEANUP( hCurl )
ENDIF
RETURN cRet
Re: De *.C Para *.Obj en BCC74 no funciona más.
Posted: Sun Nov 19, 2023 10:42 am
by leandro
Enrico buenos días como estas?
Primero que todo quiero agradecerte por el avance que has venido haciendo en xharbour
Por otro lado ya descargamos la nueva versión de xharbour para bbc770. Intentamos compilar el ejemplo para curl, pero nos sale el error que relacionamos a continuación. Creemos que es por que no encuentra el archivo de cabecera hbcurl.ch, no lo encuentro en la carpeta de FW2310 ni en la distribución de xharbour que acabamos de descargar.
#include "Hbcurl.ch" <-en donde lo podemos descargar? o si lo tienes, lo puedes publicar. De antemano gracias
Code: Select all | Expand
┌────────────────────────────────────────────────────────────────────────────┐
?FiveWin for xHarbour 23.10 - Oct. 2023 Harbour development power │▄
?(c) FiveTech 1993-2023 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7/8/10 │█
└────────────────────────────────────────────────────────────────────────────┘?
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀?
Compiling...
xHarbour 1.3.0 Intl. (SimpLex) (Build 20231104)
Copyright 1999-2023, http://www.xharbour.org http://www.harbour-project.org/
Compiling 'leandro2.prg' and generating preprocessed output to 'leandro2.ppo'...
* Compile errors *
C:\fwh2310\samples>
Re: De *.C Para *.Obj en BCC74 no funciona más.
Posted: Sun Nov 19, 2023 10:48 am
by Enrico Maria Giordano
I'm working to include hbcurl.ch, libcurl.lib and libcurl.dll in the distribution packages.
Re: De *.C Para *.Obj en BCC74 no funciona más.
Posted: Sun Nov 19, 2023 1:16 pm
by Enrico Maria Giordano
Please try with this new build and let me know:
http://www.xharbour.org/files/download/ ... bcc770.zip
This includes all the required libs and ddls for ssl and curl.
Re: De *.C Para *.Obj en BCC74 no funciona más.
Posted: Sun Nov 19, 2023 1:44 pm
by Enrico Maria Giordano
Re: De *.C Para *.Obj en BCC74 no funciona más.
Posted: Mon Nov 20, 2023 2:42 pm
by karinha
master Enrico:
Code: Select all | Expand
Lines 42, Functions/Procedures 2, pCodes 83
Embarcadero C++ 7.70 for Win32 Copyright (c) 1993-2023 Embarcadero Technologies, Inc.
FWHCURL.c:
Turbo Incremental Link 6.97 Copyright (c) 1997-2022 Embarcadero Technologies, Inc.
Error: Unresolved external '_curl_global_init_mem' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_global_cleanup' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_formfree' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_cleanup' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_reset' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_duphandle' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_init' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_pause' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_perform' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_send' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_recv' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_formadd' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_slist_append' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_setopt' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_getinfo' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_slist_free_all' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_escape' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_unescape' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_version' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_version_info' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_strerror' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_getdate' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_escape' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_unescape' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_free' referenced from C:\XHBBCC77\LIB\HBCURL.LIB|hbcurl
Error: Unable to perform link
* Linking errors *
Regards, saludos.
Re: De *.C Para *.Obj en BCC74 no funciona más.
Posted: Mon Nov 20, 2023 2:49 pm
by Enrico Maria Giordano
You have to link libcurl.dll.
Re: De *.C Para *.Obj en BCC74 no funciona más.
Posted: Mon Nov 20, 2023 3:12 pm
by karinha
Enrico Maria Giordano wrote:You have to link libcurl.dll.
OK!! Funcionó! Super many thanks.
Code: Select all | Expand
echo %hdirl%\hbcurl.lib + >> b32.bc
echo %hdirl%\libcurl.lib + >> b32.bc
Regards, saludos.
Re: De *.C Para *.Obj en BCC74 no funciona más.
Posted: Mon Nov 20, 2023 3:28 pm
by karinha
Enrico, mira esta classe hecha por el colega João Alpande:
http://www.pctoledo.com.br/forum/viewto ... 40#p162639
Gracias, thanks.
Regards, saludos.
Re: De *.C Para *.Obj en BCC74 no funciona más.
Posted: Mon Nov 20, 2023 3:48 pm
by Enrico Maria Giordano
Great! Sorry, I'm not familiar with curl (I've never used it).