pthreads for QNX 4

I need to create driver for MOXA 1150I usb to serial adapter for QNX 4.25
I got USB ddk from and written a simple usb detecting driver (logs on insertion an removal functions)
but during the compilation (linking) i got an error

cc try.o -o try -l usbdi /usr/watcom/10.6/bin/wlink op quiet form qnx flat na try op priv=3 op c libp /us r/watcom/10.6/usr/lib:/usr/lib:. f try.o l /usr/lib/usbdi.lib op offset=40k op s t=32k Warning(1028): _pthread_create_ is an undefined reference file /usr/lib/usbdi.lib(/cvs/qnx4/drivers/devu/usbdi/thread.c): undefined symbol _pthread_create_ cc: /usr/watcom/10.6/bin/wlink exited 1 make: *** [try] Error 1
seems i need pthread library
I learn that there is a beta pthread lib for QNX 425
Where to obtain it?
Or maybe there is other usb DDK which is not using pthreads?

Are you using the QNX 6 USB ddk under QNX 4? That’s what it sounds like. There was a hacked together type of threads created for QNX 4. I’m 99% sure that it didn’t use pthread_create(). It doesn’t really create threads at all, but instead processes that share the data segment.

i have just found pthreads beta on

usb ddk i got from described as
“QNX4 USB 1.0 Host Controller and class driver support
QNX4 Driver Development Kit for USB”

the threads you mean are like _begin_thread _end_thread?

i will check with beta pthreads tomorow as soon as i get to my qnx machine at work

The beta pthread stuff has pthread_create but that beta library comes with some caveat and I’m surprise that the USB DDK uses it.

hmm… usb ddk is also beta, I got it from → downloads → Prerelease Software → QNX 4 Beta Software → QNX4 USB 1.0 Host Controller and class driver support → QNX USB DDK QNX 4.25
But you are right, it is not using pthreads as I thought it does.
Linkig with pthread_g3.lin (beta i got) stays with the same pthread_create error.

Tests in pthreads-1.0b4 are compiling but the programs don’t end. I think something with pthread_join.
Makefile modified not to linking pthread_g3s.lib, gives an error of “Warning(1028): pthread_create is an undefined reference”, which seems to be different object than pthread_create.

There is iomgr.lib in USBDDK i got. I added it to my linking libs and it’s now compiling well, without pthreads.
Also need to add -T0 option, or there would be segmantation error during run.
cc try.o -o try -T0 -liomgr -lusbdi

The program is connecting to devu-uhci host and recognizing insertion of usb device.
I’ll use a moue example included in DDK to avoid further problems.

Thanks for your attention.