deciphering hbc file,, please help.tia

177 views
Skip to first unread message

rajesh nandwani

unread,
Dec 15, 2015, 7:45:56 AM12/15/15
to Harbour Users
Dear friends,
I am not able to make out from the following hbc file, which libs will be used in compilng?
platform: windows
what does ${_HB_DYNPREF} or ${_HB_DYNSUFF} mean
is there a documentation regarding hbc file anywhere,

Thanks in advance
Rajesh


#
# $Id: hbssl.hbc 16927 2011-07-16 11:17:40Z vszakats $
#

incpaths=.

skip={dos}

{!(HB_STATIC_OPENSSL&!hbdyn)}libs=${_HB_DYNPREF}${hb_name}${_HB_DYNSUFF}
{ (HB_STATIC_OPENSSL&!hbdyn)}libs=${_HB_DYNPREF}${hb_name}s${_HB_DYNSUFF}

{unix}libs=ssl crypto
{os2}libs=libssl_s libcrypto_s
{!(HB_STATIC_OPENSSL&!hbdyn)&win}libs=ssleay32 libeay32
{ (HB_STATIC_OPENSSL&!hbdyn)&win&!allmingw}libs=ssleay32 libeay32
{ (HB_STATIC_OPENSSL&!hbdyn)&allmingw}libs=ssl crypto
{ (HB_STATIC_OPENSSL&!hbdyn)&allwin}libs=crypt32

Klas Engwall

unread,
Dec 16, 2015, 6:07:19 PM12/16/15
to harbou...@googlegroups.com
Hi Rajesh,

> I am not able to make out from the following hbc file, which libs will
> be used in compilng?
> platform: windows
> what does ${_HB_DYNPREF} or ${_HB_DYNSUFF} mean
> is there a documentation regarding hbc file anywhere,

I don't think there is a description in one single place, but there are
pieces of it scattered throughout the changelog, as it was developed in
steps. Unfortunately the pieces are hard to find, especially since the
names of certain keywords have changed over time.

I am not a .hbc file expert, but ... the ${SOMETHING} notation means
that the text inside the curly braces are macros or environment
variables. ${hb_name()} refers to the name of the .hbc file itself
(minus the ".hbc" extension), in this case "hbssl", which is also the
name of the Harbour wrapper lib. In the second case an "s" follows. You
can find hbssl and hbssls libs, matching what those lines specify, in
the lib directory of the nightly build. The _HB_DYN... variables help
building the names of the lib for linking dlls or linking statically,
depending on platform and toolchain, so each line, as you read it, is
platform and toolchain agnostic, but it gets platform and toolchain
specific when the macros and envvars are evaluated.

The lines at the end of the hbssl.hbc file specify the names of the
OpenSSL libs needed (the ones that the hbssl lib wraps). OpenSSL must be
downloaded separately from the OpenSSL project and installed in your
system. The README.md file in the root directory of the Harbour tree
explains how 3rd party libs are used.

For your situation the libs that will be linked are ssleay32 and libeay32.

Regards,
Klas

vszakats

unread,
Dec 17, 2015, 5:39:57 AM12/17/15
to Harbour Users
Hi Klas,


On Thursday, December 17, 2015 at 12:07:19 AM UTC+1, Klas Engwall wrote:
Hi Rajesh,

> I am not able to make out from the following hbc file, which libs will
> be used in compilng?
> platform: windows
> what does ${_HB_DYNPREF} or ${_HB_DYNSUFF} mean
> is there a documentation regarding hbc file anywhere,

I don't think there is a description in one single place, but there are
pieces of it scattered throughout the changelog, as it was developed in
steps. Unfortunately the pieces are hard to find, especially since the
names of certain keywords have changed over time.

There is one - hbmk2's long help:
  hbmk2 -viewhelp
or:

-Viktor

Qatan

unread,
Dec 17, 2015, 7:08:17 AM12/17/15
to harbou...@googlegroups.com
Hello Viktor,
 
*There is one - hbmk2's long help:
*  hbmk2 -viewhelp
*or:
 
hbmk2 –viewhelp is very nice.
 
Thanks!
 
Qatan
 

rajesh nandwani

unread,
Dec 22, 2015, 2:15:36 AM12/22/15
to Harbour Users
Thanks Viktor, Qatan and Klas
The information was very useful
-Rajesh
Reply all
Reply to author
Forward
0 new messages