how to add libraries to the buildh.bat file

how to add libraries to the buildh.bat file

Postby FWExplorer » 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
FWExplorer
 
Posts: 100
Joined: Fri Aug 09, 2013 12:43 am

Re: how to add libraries to the buildh.bat file

Postby Antonio Linares » Mon Feb 08, 2021 9: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42078
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: how to add libraries to the buildh.bat file

Postby FWExplorer » Mon Feb 08, 2021 10:04 am

Ok, thanks Antonio.

Regards,
FWExplorer
 
Posts: 100
Joined: Fri Aug 09, 2013 12:43 am

Re: how to add libraries to the buildh.bat file

Postby FWExplorer » Mon Feb 08, 2021 2: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?
FWExplorer
 
Posts: 100
Joined: Fri Aug 09, 2013 12:43 am

Re: how to add libraries to the buildh.bat file

Postby Antonio Linares » Mon Feb 08, 2021 5: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42078
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: how to add libraries to the buildh.bat file

Postby FWExplorer » Mon Feb 08, 2021 7:54 pm

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

But I'll give it a shot, thanks.
FWExplorer
 
Posts: 100
Joined: Fri Aug 09, 2013 12:43 am

Re: how to add libraries to the buildh.bat file

Postby Natter » Tue Feb 09, 2021 1:53 pm

Hi, FWExplorer !

Tell me, did you manage to work with CURL?
Natter
 
Posts: 1214
Joined: Mon May 14, 2007 9:49 am

Re: how to add libraries to the buildh.bat file

Postby FWExplorer » Tue Feb 09, 2021 3:58 pm

It compiled correctly.

Unfortunately, the line


Code: Select all  Expand view
     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: Select all  Expand view
     cURL    = aMatch[ 1 ][ 2 ]
 
FWExplorer
 
Posts: 100
Joined: Fri Aug 09, 2013 12:43 am

Re: how to add libraries to the buildh.bat file

Postby Natter » Tue Feb 09, 2021 5:48 pm

You're talking about a file curl.h ?
Natter
 
Posts: 1214
Joined: Mon May 14, 2007 9:49 am

Re: how to add libraries to the buildh.bat file

Postby FWExplorer » Tue Feb 09, 2021 6:00 pm

No. Twitter.prg, in the samples folder.
FWExplorer
 
Posts: 100
Joined: Fri Aug 09, 2013 12:43 am

Re: how to add libraries to the buildh.bat file

Postby Antonio Linares » Tue Feb 09, 2021 6: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42078
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: how to add libraries to the buildh.bat file

Postby FWExplorer » Tue Feb 09, 2021 6:45 pm

Ok, thanks Antonio.
FWExplorer
 
Posts: 100
Joined: Fri Aug 09, 2013 12:43 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 33 guests