[Nut-upsdev] Changes to usbhid-ups driver
Arjen de Korte
nut+devel at de-korte.org
Thu Sep 6 07:25:29 UTC 2007
>> > I'm unable to compile r1088. I get lots of undefined references in
>> > libhid.c, see below. It seems that the global variables pDesc and
>> > reportbuf are declared in libhid.h, but not defined.
>>
>> That is weird, they are indeed declared in libhid.h:
>>
>> 85 extern HIDDesc_t *pDesc; /* parsed Report Descriptor */
>> 95 extern reportbuf_t *reportbuf; /* buffer for most recent
>> reports */
>>
>> But the definition is in usbhid-ups.c, so that should be resolved at
>> link
>> time:
>>
>> 98 /* global variables */
>> 99 HIDDesc_t *pDesc = NULL; /* parsed Report Descriptor
>> */
>> 100 reportbuf_t *reportbuf = NULL; /* buffer for most recent
>> reports */
>>
>> Why your linker (assume that is complaining) fails to see these, is
>> beyond
>> me.
>
> I see. The linker fails to see these because it is linking
> tripplite_usb at the time the error occurs, and not usbhid-ups. That
> driver uses libhid.o, but not usbhid-ups.o.
Euhm, could it be that you didn't run autoconf? The tripplite_usb driver
doesn't use libhid.o anymore, instead it now uses libusb.o. That would
also explain why the buildbots don't complain about this.
Best regards, Arjen
More information about the Nut-upsdev
mailing list