how to add libraries to the buildh.bat file
-
- Posts: 83
- Joined: Fri Aug 09, 2013 12:43 am
how to add libraries to the buildh.bat file
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
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
- 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
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
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
-
- Posts: 83
- Joined: Fri Aug 09, 2013 12:43 am
Re: how to add libraries to the buildh.bat file
Ok, thanks Antonio.
Regards,
Regards,
-
- Posts: 83
- Joined: Fri Aug 09, 2013 12:43 am
Re: how to add libraries to the buildh.bat file
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?
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?
- 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
Please download and use this Harbour build and it should work fine:
https://github.com/FiveTechSoft/Harbour ... _10_19.zip
https://github.com/FiveTechSoft/Harbour ... _10_19.zip
-
- Posts: 83
- Joined: Fri Aug 09, 2013 12:43 am
Re: how to add libraries to the buildh.bat file
I'm pretty sure I extracted the Fivewin build a few months ago.
But I'll give it a shot, thanks.
But I'll give it a shot, thanks.
Re: how to add libraries to the buildh.bat file
Hi, FWExplorer !
Tell me, did you manage to work with CURL?
Tell me, did you manage to work with CURL?
-
- Posts: 83
- Joined: Fri Aug 09, 2013 12:43 am
Re: how to add libraries to the buildh.bat file
It compiled correctly.
Unfortunately, the line
doesn't do anything. aMatch is empty afterwards, and then of course there's an array error on the next line
Unfortunately, the line
Code: Select all
aMatch = HB_RegExAll( 'form action="(.*?)" method="(.*?)"', cPage, .F., .T. )
Code: Select all
cURL = aMatch[ 1 ][ 2 ]
Re: how to add libraries to the buildh.bat file
You're talking about a file curl.h ?
-
- Posts: 83
- Joined: Fri Aug 09, 2013 12:43 am
Re: how to add libraries to the buildh.bat file
No. Twitter.prg, in the samples folder.
- 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
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
https://mobile.twitter.com/session/new
but it seems as such url is no longer working
We need to find the current equivalent one
-
- Posts: 83
- Joined: Fri Aug 09, 2013 12:43 am
Re: how to add libraries to the buildh.bat file
Ok, thanks Antonio.