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

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

Postby karinha » Sat Nov 18, 2023 2:47 pm

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 view  RUN

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: 7832
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

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

Postby Enrico Maria Giordano » Sat Nov 18, 2023 2:54 pm

Can I see the source code you are trying to compile, please?
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

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

Postby karinha » Sat Nov 18, 2023 3:08 pm

Enrico Maria Giordano wrote:Can I see the source code you are trying to compile, please?


Code: Select all  Expand view  RUN

// 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
karinha
 
Posts: 7832
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

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

Postby Enrico Maria Giordano » Sat Nov 18, 2023 3:29 pm

Thank you. You have to generate libcurl.lib from

Code: Select all  Expand view  RUN
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: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

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

Postby Enrico Maria Giordano » Sat Nov 18, 2023 4:08 pm

If you need all the required files just ask me.
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

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

Postby Enrico Maria Giordano » Sat Nov 18, 2023 6:52 pm

karinha wrote:
Code: Select all  Expand view  RUN
// C:\FWH\SAMPLES\FWHCURL.PRG


There is no FWHCURL.PRG in FWH. Anyway, this is the correct and working sample:

Code: Select all  Expand view  RUN
#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
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

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

Postby leandro » Sun Nov 19, 2023 10:42 am

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 view  RUN

┌────────────────────────────────────────────────────────────────────────────┐
?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
leandro
 
Posts: 1676
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

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

Postby Enrico Maria Giordano » Sun Nov 19, 2023 10:48 am

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

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

Postby Enrico Maria Giordano » Sun Nov 19, 2023 1:16 pm

Please try with this new build and let me know:

http://www.xharbour.org/files/download/windows/xhb10276_bcc770.zip

This includes all the required libs and ddls for ssl and curl.
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


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

Postby karinha » Mon Nov 20, 2023 2:42 pm

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

http://www.xharbour.org/files/download/windows/xhb10276_bcc770.zip


master Enrico:

Code: Select all  Expand view  RUN

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: 7832
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil


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

Postby karinha » Mon Nov 20, 2023 3:12 pm

Enrico Maria Giordano wrote:You have to link libcurl.dll.


OK!! Funcionó! Super many thanks.

Code: Select all  Expand view  RUN

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: 7832
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

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

Postby karinha » Mon Nov 20, 2023 3:28 pm

Enrico, mira esta classe hecha por el colega João Alpande:

http://www.pctoledo.com.br/forum/viewtopic.php?f=4&t=27288&p=162640#p162639

Gracias, thanks.

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7832
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

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

Postby Enrico Maria Giordano » Mon Nov 20, 2023 3:48 pm

Great! Sorry, I'm not familiar with curl (I've never used it).
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

PreviousNext

Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: D.Fernandez, Google [Bot] and 38 guests