how to add libraries to the buildh.bat file

Post Reply
FWExplorer
Posts: 83
Joined: Fri Aug 09, 2013 12:43 am

how to add libraries to the buildh.bat file

Post by FWExplorer »

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

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

Post by Antonio Linares »

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

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

Post by FWExplorer »

Ok, thanks Antonio.

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

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

Post by FWExplorer »

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?
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

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

Post by Antonio Linares »

Please download and use this Harbour build and it should work fine:

https://github.com/FiveTechSoft/Harbour ... _10_19.zip
regards, saludos

Antonio Linares
www.fivetechsoft.com
FWExplorer
Posts: 83
Joined: Fri Aug 09, 2013 12:43 am

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

Post by FWExplorer »

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

But I'll give it a shot, thanks.
Natter
Posts: 524
Joined: Mon May 14, 2007 9:49 am

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

Post by Natter »

Hi, FWExplorer !

Tell me, did you manage to work with CURL?
FWExplorer
Posts: 83
Joined: Fri Aug 09, 2013 12:43 am

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

Post by FWExplorer »

It compiled correctly.

Unfortunately, the line

Code: Select all

      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

      cURL    = aMatch[ 1 ][ 2 ]
 
Natter
Posts: 524
Joined: Mon May 14, 2007 9:49 am

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

Post by Natter »

You're talking about a file curl.h ?
FWExplorer
Posts: 83
Joined: Fri Aug 09, 2013 12:43 am

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

Post by FWExplorer »

No. Twitter.prg, in the samples folder.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

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

Post by Antonio Linares »

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

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

Post by FWExplorer »

Ok, thanks Antonio.
Post Reply