Multithread issue

Multithread issue

Postby patdriscoll » Tue Jul 17, 2018 3:21 am

Hello all,

I could use a bit of your collective wisdom, please.

I am converting an application from xHB (.com) to harbour (FW1.7, harbour and bcc7). I need to make use of multi threading. I have linked in cw32mt.lib instead of cw32.lib

My application returns FALSE for a call to HB_MultiThread(). It links OK, but does not start another thread, hence I get an error when I stop the thread.

Is multithread supported with harbour? If so, what am I missing, please?

Thanks in anticipation.

Pat.

MAK file follows:


#Borland make sample (c) FiveTech Software 2005-2009

HBDIR=c:\harbour
BCDIR=c:\bcc7
FWDIR=c:\fwh17

#change these paths as needed
.path.OBJ = .\obj
.path.PRG = .\
.path.CH = $(FWDIR)\include;$(HBDIR)\include
.path.C = .\
.path.rc = .\

#important: Use Uppercase for filenames extensions, in the next two rules!

PRG = \
ottos.PRG \
printers.PRG \
errview.PRG \
compdetl.PRG \
HELP.PRG \
nameinit.PRG \
SYSOPTS.PRG \
MWINUTIL.PRG \
WINUTIL.PRG \
ABOUT.PRG \
FAQ.PRG \
factsht.PRG \
stocksel.PRG \
stockcat.PRG \
register.PRG \
screen.PRG \
tsm.PRG \
paytypes.PRG \
tabs.PRG \
POS.PRG \
POSSETUP.PRG \
paybuttn.PRG \
datasync.PRG \
repsales.PRG \
repstaff.PRG \
repregid.PRG \
DKTPRINT.PRG \
repbank.PRG \
reglook.PRG \
reminder.PRG \
RepSale1.PRG \
dktorder.PRG \
tables.PRG \
DKTTABLE.PRG \
discount.PRG \
dktcharge.PRG \
btnlabel.PRG \
repsale2.PRG \
email.PRG \
emailbrw.PRG \
repacct.PRG \
repacc1.PRG \
dktsales.PRG \
POS1.PRG \
repsale3.PRG \
RepSale4.PRG \
tsmtp.PRG \
UTILS.PRG \
suppsel.PRG \
stksel1.PRG \
stkrec.PRG \
repsale5.PRG \
colldata.PRG \
ORDPOST.PRG \
ordprn.PRG \
ORDSEL.PRG \
lkupsupp.PRG \
password.PRG \
ASSMAKE.PRG \
xStkRec.PRG \
xstktake.PRG \
setmenu.PRG \
stkvar.PRG \
RepSal1a.PRG \
ORDOPTS.PRG \
eftpos.PRG \
TABOnFly.PRG \
ChitDisp.PRG \
repsale6.PRG \
repsale7.PRG \
stockgrp.PRG \
archive.PRG \
cusentry.PRG \
CUSTSEL.PRG \
PROMO.PRG \
syscolrs.PRG \
CUSTORD.PRG \
units.PRG \
colines.PRG \
HHOrders.PRG \
dktoitem.PRG \
DASH1.PRG \
repsale8.PRG \
reports.PRG \
REPTIMES.PRG \
REGDEFLT.PRG \
genlabel.PRG \
lkupstk.PRG \
USERS.PRG \
txtahead.PRG \
repbank2.PRG \
PUBHOLS.PRG \
zrepcat.PRG \
repbank3.PRG \
events.PRG \
EVNTFOOD.PRG \
RepSal1b.PRG \
EVENTORD.PRG \
SALETIME.PRG \
dashbd1.PRG \
dashbd1a.PRG \
reqhead.PRG \
DEPT.PRG \
reqlines.PRG \
TASKLIST.PRG \
tasklst1.PRG \
nonconf.PRG \
position.PRG \
SHIFTS.PRG \
dashbd2.PRG \
taskutil.PRG \
repsale9.PRG \
prodrun.PRG \
activex.PRG \
calendar.PRG \
tcalend.PRG \
repsal4a.PRG \
vouchers.PRG \
sms.PRG \
dashbd3.PRG \
repconv.PRG \
shopify.PRG \
dash1a.PRG \
pos2.PRG \
evnttime.PRG \
wasteprn.PRG \
stockop1.PRG \
wbrowse.PRG

rem C = \
rem two.C

PROJECT : ottos.exe

ottos.exe : $(PRG:.PRG=.OBJ) $(C:.C=.OBJ) ottos.res
echo off
echo $(BCDIR)\lib\c0w32.obj + > b32.bc

echo obj\ottos.obj + >> b32.bc
echo obj\printers.obj + >> b32.bc
echo obj\errview.obj + >> b32.bc
echo obj\compdetl.obj + >> b32.bc
echo obj\HELP.obj + >> b32.bc
echo obj\nameinit.obj + >> b32.bc
echo obj\SYSOPTS.obj + >> b32.bc
echo obj\MWINUTIL.obj + >> b32.bc
echo obj\WINUTIL.obj + >> b32.bc
echo obj\ABOUT.obj + >> b32.bc
echo obj\FAQ.obj + >> b32.bc
echo obj\factsht.obj + >> b32.bc
echo obj\stocksel.obj + >> b32.bc
echo obj\stockcat.obj + >> b32.bc
echo obj\register.obj + >> b32.bc
echo obj\screen.obj + >> b32.bc
echo obj\tsm.obj + >> b32.bc
echo obj\paytypes.obj + >> b32.bc
echo obj\tabs.obj + >> b32.bc
echo obj\POS.obj + >> b32.bc
echo obj\POSSETUP.obj + >> b32.bc
echo obj\paybuttn.obj + >> b32.bc
echo obj\datasync.obj + >> b32.bc
echo obj\repsales.obj + >> b32.bc
echo obj\repstaff.obj + >> b32.bc
echo obj\repregid.obj + >> b32.bc
echo obj\DKTPRINT.obj + >> b32.bc
echo obj\repbank.obj + >> b32.bc
echo obj\reglook.obj + >> b32.bc
echo obj\reminder.obj + >> b32.bc
echo obj\RepSale1.obj + >> b32.bc
echo obj\dktorder.obj + >> b32.bc
echo obj\tables.obj + >> b32.bc
echo obj\DKTTABLE.obj + >> b32.bc
echo obj\discount.obj + >> b32.bc
echo obj\dktcharge.obj + >> b32.bc
echo obj\btnlabel.obj + >> b32.bc
echo obj\repsale2.obj + >> b32.bc
echo obj\email.obj + >> b32.bc
echo obj\emailbrw.obj + >> b32.bc
echo obj\repacct.obj + >> b32.bc
echo obj\repacc1.obj + >> b32.bc
echo obj\dktsales.obj + >> b32.bc
echo obj\POS1.obj + >> b32.bc
echo obj\repsale3.obj + >> b32.bc
echo obj\RepSale4.obj + >> b32.bc
echo obj\tsmtp.obj + >> b32.bc
echo obj\UTILS.obj + >> b32.bc
echo obj\suppsel.obj + >> b32.bc
echo obj\stksel1.obj + >> b32.bc
echo obj\stkrec.obj + >> b32.bc
echo obj\repsale5.obj + >> b32.bc
echo obj\colldata.obj + >> b32.bc
echo obj\ORDPOST.obj + >> b32.bc
echo obj\ordprn.obj + >> b32.bc
echo obj\ORDSEL.obj + >> b32.bc
echo obj\lkupsupp.obj + >> b32.bc
echo obj\password.obj + >> b32.bc
echo obj\ASSMAKE.obj + >> b32.bc
echo obj\xStkRec.obj + >> b32.bc
echo obj\xstktake.obj + >> b32.bc
echo obj\setmenu.obj + >> b32.bc
echo obj\stkvar.obj + >> b32.bc
echo obj\RepSal1a.obj + >> b32.bc
echo obj\ORDOPTS.obj + >> b32.bc
echo obj\eftpos.obj + >> b32.bc
echo obj\TABOnFly.obj + >> b32.bc
echo obj\ChitDisp.obj + >> b32.bc
echo obj\repsale6.obj + >> b32.bc
echo obj\repsale7.obj + >> b32.bc
echo obj\stockgrp.obj + >> b32.bc
echo obj\archive.obj + >> b32.bc
echo obj\cusentry.obj + >> b32.bc
echo obj\CUSTSEL.obj + >> b32.bc
echo obj\PROMO.obj + >> b32.bc
echo obj\syscolrs.obj + >> b32.bc
echo obj\CUSTORD.obj + >> b32.bc
echo obj\units.obj + >> b32.bc
echo obj\colines.obj + >> b32.bc
echo obj\HHOrders.obj + >> b32.bc
echo obj\dktoitem.obj + >> b32.bc
echo obj\DASH1.obj + >> b32.bc
echo obj\repsale8.obj + >> b32.bc
echo obj\reports.obj + >> b32.bc
echo obj\REPTIMES.obj + >> b32.bc
echo obj\REGDEFLT.obj + >> b32.bc
echo obj\genlabel.obj + >> b32.bc
echo obj\lkupstk.obj + >> b32.bc
echo obj\USERS.obj + >> b32.bc
echo obj\txtahead.obj + >> b32.bc
echo obj\repbank2.obj + >> b32.bc
echo obj\PUBHOLS.obj + >> b32.bc
echo obj\zrepcat.obj + >> b32.bc
echo obj\repbank3.obj + >> b32.bc
echo obj\events.obj + >> b32.bc
echo obj\EVNTFOOD.obj + >> b32.bc
echo obj\RepSal1b.obj + >> b32.bc
echo obj\EVENTORD.obj + >> b32.bc
echo obj\SALETIME.obj + >> b32.bc
echo obj\dashbd1.obj + >> b32.bc
echo obj\dashbd1a.obj + >> b32.bc
echo obj\reqhead.obj + >> b32.bc
echo obj\DEPT.obj + >> b32.bc
echo obj\reqlines.obj + >> b32.bc
echo obj\TASKLIST.obj + >> b32.bc
echo obj\tasklst1.obj + >> b32.bc
echo obj\nonconf.obj + >> b32.bc
echo obj\position.obj + >> b32.bc
echo obj\SHIFTS.obj + >> b32.bc
echo obj\dashbd2.obj + >> b32.bc
echo obj\taskutil.obj + >> b32.bc
echo obj\repsale9.obj + >> b32.bc
echo obj\activex.obj + >> b32.bc
echo obj\wbrowse.obj + >> b32.bc
echo obj\prodrun.obj + >> b32.bc
echo obj\tcalend.obj + >> b32.bc
echo obj\repsal4a.obj + >> b32.bc
echo obj\vouchers.obj + >> b32.bc
echo obj\sms.obj + >> b32.bc
echo obj\dashbd3.obj + >> b32.bc
echo obj\repconv.obj + >> b32.bc
echo obj\shopify.obj + >> b32.bc
echo obj\dash1a.obj + >> b32.bc
echo obj\POS2.obj + >> b32.bc
echo obj\evnttime.obj + >> b32.bc
echo obj\wasteprn.obj + >> b32.bc
echo obj\stockop1.obj + >> b32.bc
echo obj\calendar.obj, + >> b32.bc

echo ottos.exe, + >> b32.bc
echo ottos.map, + >> b32.bc

echo $(FWDIR)\lib\FiveH.lib + >> b32.bc
echo $(FWDIR)\lib\FiveHC.lib + >> b32.bc

echo $(HBDIR)\lib\hbrtl.lib + >> b32.bc
echo $(HBDIR)\lib\hbvm.lib + >> b32.bc
echo $(HBDIR)\lib\gtgui.lib + >> b32.bc
echo $(HBDIR)\lib\hblang.lib + >> b32.bc
echo $(HBDIR)\lib\hbmacro.lib + >> b32.bc
echo $(HBDIR)\lib\hbrdd.lib + >> b32.bc
echo $(HBDIR)\lib\rddntx.lib + >> b32.bc
echo $(HBDIR)\lib\rddcdx.lib + >> b32.bc
echo $(HBDIR)\lib\rddfpt.lib + >> b32.bc
echo $(HBDIR)\lib\hbsix.lib + >> b32.bc
echo $(HBDIR)\lib\hbdebug.lib + >> b32.bc
echo $(HBDIR)\lib\hbcommon.lib + >> b32.bc
echo $(HBDIR)\lib\hbpp.lib + >> b32.bc
echo $(HBDIR)\lib\hbwin.lib + >> b32.bc
echo $(HBDIR)\lib\hbcpage.lib + >> b32.bc
echo $(HBDIR)\lib\hbct.lib + >> b32.bc

echo $(HBDIR)\lib\hbziparc.lib + >> b32.bc
echo $(HBDIR)\lib\hbmzip.lib + >> b32.bc
echo $(HBDIR)\lib\hbzlib.lib + >> b32.bc
echo $(HBDIR)\lib\minizip.lib + >> b32.bc
echo $(HBDIR)\lib\hbcplr.lib + >> b32.bc
echo $(HBDIR)\lib\xhb.lib + >> b32.bc
echo $(HBDIR)\lib\hbpcre.lib + >> b32.bc

rem Uncomment these two lines to use Advantage RDD
rem echo $(HBDIR)\lib\rddads.lib + >> b32.bc
rem echo $(HBDIR)\lib\Ace32.lib + >> b32.bc

echo $(BCDIR)\lib\cw32mt.lib + >> b32.bc
echo $(BCDIR)\lib\import32.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\odbc32.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\shell32.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\nddeapi.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\iphlpapi.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\msimg32.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\rasapi32.lib, >> b32.bc

IF EXIST ottos.res echo ottos.res >> b32.bc
$(BCDIR)\bin\ilink32 -Gn -aa -Tpe -s @b32.bc
del b32.bc

.PRG.OBJ:
$(HBDIR)\bin\harbour $< /N /W /Oobj\ /I$(FWDIR)\include;$(HBDIR)\include
$(BCDIR)\bin\bcc32 -c -tWM -I$(HBDIR)\include -oobj\$& obj\$&.c > error.txt

.C.OBJ:
echo -c -tWM -D__HARBOUR__ -DHB_API_MACROS > tmp
echo -I$(HBDIR)\include;$(FWDIR)\include >> tmp
$(BCDIR)\bin\bcc32 -oobj\$& @tmp $&.c
del tmp

ottos.res : ottos.rc
$(BCDIR)\bin\brc32.exe -r ottos.rc
Pat Driscoll
Australia
User avatar
patdriscoll
 
Posts: 16
Joined: Tue May 19, 2009 7:28 pm

Re: Multithread issue

Postby cnavarro » Tue Jul 17, 2018 4:12 am

Change

echo $(HBDIR)\lib\hbvm.lib + >> b32.bc


with

echo $(HBDIR)\lib\hbvmmt.lib + >> b32.bc
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Multithread issue

Postby patdriscoll » Tue Jul 17, 2018 4:57 am

cnavarro You are the Man! Thank you.
User avatar
patdriscoll
 
Posts: 16
Joined: Tue May 19, 2009 7:28 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 60 guests

cron