hi, I try to use a usb port under QNX 6.2. I have a pb with the function usbd_connect() (which is actually the first one I test). I copyed in a main programm what is written in the HELP:
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <sys/usbdi.h>
int main()
{
_uint32 USB_VENDOR_ATMEL;
_uint32 USB_PRODUCT_ATMEL_43USB355;
int argc;
char **argv;
void (*insertion)(struct usbd_connection *, usbd_device_instance_t *instance);
void (*removal)(struct usbd_connection *, usbd_device_instance_t *instance);
usbd_device_ident_t interest = {
USB_VENDOR_ATMEL,
USB_PRODUCT_ATMEL_43USB355,
USBD_CONNECT_WILDCARD,
USBD_CONNECT_WILDCARD,
USBD_CONNECT_WILDCARD,
};
usbd_funcs_t funcs = {
_USBDI_NFUNCS,
insertion,
removal,
NULL
};
usbd_connect_parm_t cparms = {
NULL,
USB_VERSION,
USBD_VERSION,
0,
argc,
argv,
0,
&interest,
&funcs
};
struct usbd_connection *connection;
int error;
error = usbd_connect(&cparms, &connection);
}
When I try to get the executable, it doesn’t recognize the function (“undefined reference usbd_connect”). So I guess I have to build the executable thanks to a library in which usbd_connect.o is referenced (qcc -o prog_static prog.o -Bstatic -L ./-l lib.a), or something like that ? If guess right, where is this library (and is it the same library for usbd_attach(), usbd_descriptor(), etc…) ? Or am I totally wrong and if so, could anyone explain me how to solve this pb?