Hi Pritpal, > hbmk2 E:\dev_hbmk\xharbour\cacherdd.hbp -hblib -xhb -q -trace -info -lang=en > -width=512 -rebuild -env:__MT__- > > ... > ... > > Unrecoverable error 9023: hb_xgrab requested to allocate zero bytes > Called from HB_SETENV(0) > Called from HBMK2(945) in ../../../hbmk2.prg > Called from MAIN(473) in ../../../hbmk2.prg
This looks like a bug in low level hb_setenv() function. > I was trying to supress define, if any, __MT__ and tried as documented: > -env:__MT__- -env is not meant to suppress defines, but envvars. To suppress a define, use '-under:__MT__' Harbour option. To forcefully request ST mode in hbmk2, use '-st'. > I had to initiate it like this because in one of the C source, these are the > lines: > > #ifdef __MT__ > #include "hbthread.h" > static PHB_ITEM s_pMtx = NULL; > #endif > > For Harbour builds, it is OK as I define __MT__ but for xHarbour compiles > __MT__ is never defined but still I reach to line; #include "hbthread.h" > and there is no define as such in above C source or elsewhere nor it is > visible in the logs. It is a mystery how __MT__ peeps in. __MT__ is not a Harbour internal constant, so it must be defined somewhere in your sources, or maybe in xhb headers. For sure it's not defined (or used) by hbmk2. Viktor _______________________________________________ Harbour mailing list (attachment size limit: 40KB) [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
