libcurl.dll Usage ?

400 views
Skip to first unread message

Mel Smith

unread,
Nov 28, 2019, 6:12:41 PM11/28/19
to Harbour Users
Hi All:

   How do I 'link up' libcurl.dll so that its internal functions can be called by  a Harbour app that I'm building. ?

   (I'm not familiar with .dll usage)

Thanks !

-Mel Smith


Maurizio la Cecilia

unread,
Nov 29, 2019, 7:19:02 AM11/29/19
to harbou...@googlegroups.com
Hi Mel,
did you try the contrib hbcurl?
AFAIR it should work very well using dll.
I'd try to link it statically but with no luck.
Thus, setting HB_WITH_STATIC_CURL=no in your hbp script, you should obtain what wanted.
Best regards.
--
Maurizio
--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-users/e44b738c-7242-4b8b-ae96-3951589df5ec%40googlegroups.com.


Mel Smith

unread,
Nov 29, 2019, 1:09:28 PM11/29/19
to Harbour Users
Hi Maurizio::
There are : c:\harbour\lib\hbcurl.lib, c:\harbour\lib\hbcurls.lib, and then c:\myapp\libcurl.dll, and I can't find examples of  calling functions embedded in external .dll files.
 Can someone provide an example of using these three curl-related files to access a function in an external .dll file ?

(btw, in xHarbour, it seems quite straightforward to 'load' the external .dll file using LoadLibrary(), then dllcall(some function), then Free the library with FreeLibrary(). But, I would rather stay with Harbour .)

Thanks for your response.
-Mel Smith

On Friday, November 29, 2019 at 5:19:02 AM UTC-7, Maurizio la Cecilia wrote:
Hi Mel,
did you try the contrib hbcurl?
AFAIR it should work very well using dll.
I'd try to link it statically but with no luck.
Thus, setting HB_WITH_STATIC_CURL=no in your hbp script, you should obtain what wanted.
Best regards.
--
Maurizio
 
Il 29/11/2019 00:12, Mel Smith ha scritto:
Hi All:

   How do I 'link up' libcurl.dll so that its internal functions can be called by  a Harbour app that I'm building. ?

   (I'm not familiar with .dll usage)

Thanks !

-Mel Smith


--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.

Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbou...@googlegroups.com.

Maurizio la Cecilia

unread,
Nov 29, 2019, 2:40:48 PM11/29/19
to harbou...@googlegroups.com
Hi Mel,
AFAIK it's the contrib library itself that take charge of dll loading.
I guess that curl_global_init() does the job.
To have an idea about hbcurl functions calling syntax you could take a look to contrib\hbcurl\tests\ftp_uldl.prg.
In addition, I remember a thread in this list in which  Paola Bruccolieri sent an example of http usage.
Best regards.
--
Maurizio

Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-users/2eddf377-e4bf-4e18-a387-fbb6681e00b8%40googlegroups.com.


Budyanto Djajapermana

unread,
Oct 14, 2021, 2:27:58 AM10/14/21
to Harbour Users
Hello Harbour Users,

I am used to do cUrl via command line, but now I need to do it via the cUrl library.

I am replying this old thread with the hope to have better chance of getting related info.

First step into hbcurl contrib is by doing contrib\hbcurl\tests\ftp_uldl.prg.
Unfortunately I failed compiling this prg with this error:

LINK : fatal error LNK1181: cannot open input file 'libssh2.lib'
hbmk2: Error: Running linker. 1181


Could someone help me with info regarding this?

I build hbssl and hbcurl contrib some time ago as explained in here:
https://groups.google.com/g/harbour-users/c/ICJ6SfxWlqw/m/Hl8Jm1hBAwAJ

Did I miss something when I built the contribs? Or do I have to add something to let hbmk2 be able to build the contrib\hbcurl\tests\ftp_uldl.prg?

Thanking you in advance,
budyanto
Reply all
Reply to author
Forward
0 new messages