De *.C Para *.Obj en BCC74 no funciona más.

User avatar
karinha
Posts: 7885
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Contact:

Re: De *.C Para *.Obj en BCC74 no funciona más.

Post 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.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
Posts: 7885
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Contact:

Re: De *.C Para *.Obj en BCC74 no funciona más.

Post 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.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
Enrico Maria Giordano
Posts: 8728
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: De *.C Para *.Obj en BCC74 no funciona más.

Post by Enrico Maria Giordano »

Thank you. You have to generate libcurl.lib from

Code: Select all | Expand

implib -a libcurl.lib libcurl.dll
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.
User avatar
Enrico Maria Giordano
Posts: 8728
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: De *.C Para *.Obj en BCC74 no funciona más.

Post by Enrico Maria Giordano »

karinha wrote:

Code: Select all | Expand

// C:\FWH\SAMPLES\FWHCURL.PRG
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
User avatar
leandro
Posts: 1688
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia
Contact:

Re: De *.C Para *.Obj en BCC74 no funciona más.

Post by leandro »

Enrico buenos días como estas?

Primero que todo quiero agradecerte por el avance que has venido haciendo en xharbour :D

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>
 
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
Enrico Maria Giordano
Posts: 8728
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: De *.C Para *.Obj en BCC74 no funciona más.

Post by Enrico Maria Giordano »

I'm working to include hbcurl.ch, libcurl.lib and libcurl.dll in the distribution packages.
User avatar
Enrico Maria Giordano
Posts: 8728
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: De *.C Para *.Obj en BCC74 no funciona más.

Post 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.
User avatar
karinha
Posts: 7885
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Contact:

Re: De *.C Para *.Obj en BCC74 no funciona más.

Post by karinha »

Enrico Maria Giordano wrote:Please download it again, I forgot libcurl.dll. :-)

http://www.xharbour.org/files/download/ ... bcc770.zip
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.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
Posts: 7885
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Contact:

Re: De *.C Para *.Obj en BCC74 no funciona más.

Post 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.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
Posts: 7885
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Contact:

Re: De *.C Para *.Obj en BCC74 no funciona más.

Post 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.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Post Reply