FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour how to add libraries to the buildh.bat file
Posts: 103
Joined: Fri Aug 09, 2013 12:43 AM
how to add libraries to the buildh.bat file
Posted: Sun Feb 07, 2021 10:51 PM

Hi,

I'm getting missing externals from twitter, which I believe are found in libcurl.lib, in the harbour distribution.

What's the official way to add specific contribution libraries to buildh.bat?

When I try compile twitter.prg, the externals are

Compiling...
Harbour 3.2.0dev (r2008190002)
Copyright (c) 1999-2020, https://harbour.github.io/
Compiling 'twitter.prg' and generating preprocessed output to 'twitter.ppo'...
Lines 5663, Functions/Procedures 2
Generating C source output to 'twitter.c'... Done.
Embarcadero C++ 7.00 for Win32 Copyright (c) 1993-2015 Embarcadero Technologies, Inc.
twitter.c:
Turbo Incremental Link 6.70 Copyright (c) 1997-2014 Embarcadero Technologies, Inc.
Error: Unresolved external '_HB_FUN_CURL_GLOBAL_INIT' referenced from C:\FWH\SAMPLES\TWITTER.OBJ
Error: Unresolved external '_HB_FUN_CURL_EASY_INIT' referenced from C:\FWH\SAMPLES\TWITTER.OBJ
Error: Unresolved external '_HB_FUN_CURL_EASY_SETOPT' referenced from C:\FWH\SAMPLES\TWITTER.OBJ
Error: Unresolved external '_HB_FUN_CURL_EASY_PERFORM' referenced from C:\FWH\SAMPLES\TWITTER.OBJ
Error: Unresolved external '_HB_FUN_CURL_EASY_RESET' referenced from C:\FWH\SAMPLES\TWITTER.OBJ
Error: Unresolved external '_HB_FUN_CURL_GLOBAL_CLEANUP' referenced from C:\FWH\SAMPLES\TWITTER.OBJ

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: how to add libraries to the buildh.bat file
Posted: Mon Feb 08, 2021 09:32 AM

D.

You have to add these lines in buildh.bat to build it using BCC7:

echo %hdirl%\hbcurl.lib + >> b32.bc
echo %hdirl%\libcurl.lib + >> b32.bc

or add these lines in buildh32.bat to build it using Visual Studio Community

echo %hdirl%\hbcurl.lib >> msvc.tmp
echo %hdirl%\libcurl.lib >> msvc.tmp

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 103
Joined: Fri Aug 09, 2013 12:43 AM
Re: how to add libraries to the buildh.bat file
Posted: Mon Feb 08, 2021 10:04 AM

Ok, thanks Antonio.

Regards,

Posts: 103
Joined: Fri Aug 09, 2013 12:43 AM
Re: how to add libraries to the buildh.bat file
Posted: Mon Feb 08, 2021 02:50 PM

Got further, but there's still some missing externals

Error: Unresolved external '_curl_global_init_mem' referenced from C:\HARBOUR\LIB\HBCURL.LIB|core
Error: Unresolved external '_curl_global_cleanup' referenced from C:\HARBOUR\LIB\HBCURL.LIB|core
Error: Unresolved external '_curl_formfree' referenced from C:\HARBOUR\LIB\HBCURL.LIB|core
Error: Unresolved external '_curl_easy_cleanup' referenced from C:\HARBOUR\LIB\HBCURL.LIB|core
Error: Unresolved external '_curl_easy_reset' referenced from C:\HARBOUR\LIB\HBCURL.LIB|core
Error: Unresolved external '_curl_easy_duphandle' referenced from C:\HARBOUR\LIB\HBCURL.LIB|core
Error: Unresolved external '_curl_easy_init' referenced from C:\HARBOUR\LIB\HBCURL.LIB|core
Error: Unresolved external '_curl_easy_pause' referenced from C:\HARBOUR\LIB\HBCURL.LIB|core
Error: Unresolved external '_curl_easy_perform' referenced from C:\HARBOUR\LIB\HBCURL.LIB|core
Error: Unresolved external '_curl_easy_send' referenced from C:\HARBOUR\LIB\HBCURL.LIB|core
Error: Unresolved external '_curl_easy_recv' referenced from C:\HARBOUR\LIB\HBCURL.LIB|core
Error: Unresolved external '_curl_formadd' referenced from C:\HARBOUR\LIB\HBCURL.LIB|core
Error: Unresolved external '_curl_slist_append' referenced from C:\HARBOUR\LIB\HBCURL.LIB|core
Error: Unresolved external '_curl_easy_setopt' referenced from C:\HARBOUR\LIB\HBCURL.LIB|core
Error: Unresolved external '_curl_easy_getinfo' referenced from C:\HARBOUR\LIB\HBCURL.LIB|core
Error: Unresolved external '_curl_slist_free_all' referenced from C:\HARBOUR\LIB\HBCURL.LIB|core
Error: Unresolved external '_curl_easy_escape' referenced from C:\HARBOUR\LIB\HBCURL.LIB|core
Error: Unresolved external '_curl_easy_unescape' referenced from C:\HARBOUR\LIB\HBCURL.LIB|core
Error: Unresolved external '_curl_version' referenced from C:\HARBOUR\LIB\HBCURL.LIB|core
Error: Unresolved external '_curl_version_info' referenced from C:\HARBOUR\LIB\HBCURL.LIB|core
Error: Unresolved external '_curl_easy_strerror' referenced from C:\HARBOUR\LIB\HBCURL.LIB|core
Error: Unresolved external '_curl_getdate' referenced from C:\HARBOUR\LIB\HBCURL.LIB|core
Error: Unresolved external '_curl_escape' referenced from C:\HARBOUR\LIB\HBCURL.LIB|core
Error: Unresolved external '_curl_unescape' referenced from C:\HARBOUR\LIB\HBCURL.LIB|core
Error: Unresolved external '_curl_free' referenced from C:\HARBOUR\LIB\HBCURL.LIB|core
Error: Unable to perform link

These seem to be referenced in

 c:\harbour\comp\mingw\include\curl\curl.h

Should I put

c:\harbour\comp\mingw\include\curl

in the INCLUDE paths?

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: how to add libraries to the buildh.bat file
Posted: Mon Feb 08, 2021 05:50 PM
Please download and use this Harbour build and it should work fine:

https://github.com/FiveTechSoft/Harbour_builder/blob/master/harbour_win32_bcc_2020_10_19.zip
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 103
Joined: Fri Aug 09, 2013 12:43 AM
Re: how to add libraries to the buildh.bat file
Posted: Mon Feb 08, 2021 07:54 PM

I'm pretty sure I extracted the Fivewin build a few months ago.

But I'll give it a shot, thanks.

Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: how to add libraries to the buildh.bat file
Posted: Tue Feb 09, 2021 01:53 PM

Hi, FWExplorer !

Tell me, did you manage to work with CURL?

Posts: 103
Joined: Fri Aug 09, 2013 12:43 AM
Re: how to add libraries to the buildh.bat file
Posted: Tue Feb 09, 2021 03:58 PM
It compiled correctly.

Unfortunately, the line


Code (fw): Select all Collapse
      aMatch  = HB_RegExAll( 'form action="(.*?)" method="(.*?)"', cPage, .F., .T. )


doesn't do anything. aMatch is empty afterwards, and then of course there's an array error on the next line


Code (fw): Select all Collapse
      cURL    = aMatch[ 1 ][ 2 ]
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: how to add libraries to the buildh.bat file
Posted: Tue Feb 09, 2021 05:48 PM

You're talking about a file curl.h ?

Posts: 103
Joined: Fri Aug 09, 2013 12:43 AM
Re: how to add libraries to the buildh.bat file
Posted: Tue Feb 09, 2021 06:00 PM

No. Twitter.prg, in the samples folder.

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: how to add libraries to the buildh.bat file
Posted: Tue Feb 09, 2021 06:31 PM
twitter.prg uses this url:

https://mobile.twitter.com/session/new

but it seems as such url is no longer working

We need to find the current equivalent one
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 103
Joined: Fri Aug 09, 2013 12:43 AM
Re: how to add libraries to the buildh.bat file
Posted: Tue Feb 09, 2021 06:45 PM

Ok, thanks Antonio.

Continue the discussion