Page 1 of 1
how to add libraries to the buildh.bat file
Posted: Sun Feb 07, 2021 10:51 pm
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
Re: how to add libraries to the buildh.bat file
Posted: Mon Feb 08, 2021 9:32 am
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
Re: how to add libraries to the buildh.bat file
Posted: Mon Feb 08, 2021 10:04 am
by FWExplorer
Ok, thanks Antonio.
Regards,
Re: how to add libraries to the buildh.bat file
Posted: Mon Feb 08, 2021 2:50 pm
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?
Re: how to add libraries to the buildh.bat file
Posted: Mon Feb 08, 2021 5:50 pm
by Antonio Linares
Please download and use this Harbour build and it should work fine:
https://github.com/FiveTechSoft/Harbour ... _10_19.zip
Re: how to add libraries to the buildh.bat file
Posted: Mon Feb 08, 2021 7:54 pm
by FWExplorer
I'm pretty sure I extracted the Fivewin build a few months ago.
But I'll give it a shot, thanks.
Re: how to add libraries to the buildh.bat file
Posted: Tue Feb 09, 2021 1:53 pm
by Natter
Hi, FWExplorer !
Tell me, did you manage to work with CURL?
Re: how to add libraries to the buildh.bat file
Posted: Tue Feb 09, 2021 3:58 pm
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
Re: how to add libraries to the buildh.bat file
Posted: Tue Feb 09, 2021 5:48 pm
by Natter
You're talking about a file curl.h ?
Re: how to add libraries to the buildh.bat file
Posted: Tue Feb 09, 2021 6:00 pm
by FWExplorer
No. Twitter.prg, in the samples folder.
Re: how to add libraries to the buildh.bat file
Posted: Tue Feb 09, 2021 6:31 pm
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
Re: how to add libraries to the buildh.bat file
Posted: Tue Feb 09, 2021 6:45 pm
by FWExplorer
Ok, thanks Antonio.