how can i apply the libopenobex in my app

  • phenix

    I compile the package openobex as follows:
    step1.Compile the openobex package by default:
          #make install
    At the present, there is  libopenobex.a and  in  /usr/local/lib/ ,as well as obex_const.h    and obex.h are in  /usr/local/include/openobex.Now I want to apply them in my application.

    step2.'cp' irxfer.c   obex_io.c bex_io.h obex_put_common.c obex_put_common.h of the directory
          <openobex package>/apps to /root/progame

    step3. #cd /root/progame
          #gcc -c *.c
          #gcc -o ir_test *.o -I/usr/local/include /usr/local/lib/libopenobex.a

    But errors are coming:

      /usr/local/lib/libopenobex.a(obex_transport.o)(.text+0x48f): In function `obex_transport_write':
      obex_transport.c: undefined reference to `usb_bulk_write'
      /usr/local/lib/libopenobex.a(obex_transport.o)(.text+0x53b): In function `obex_transport_read':
      /usr/local/lib/libopenobex.a(usbobex.o)(.text+0x862):usbobex.c: undefined reference to    'usb_release_interface'
      /usr/local/lib/libopenobex.a(usbobex.o)(.text+0x86e):usbobex.c: undefined reference to `usb_close'
      /usr/local/lib/libopenobex.a(usbobex.o)(.text+0x880):usbobex.c: undefined reference to `usb_close'
      collect2: ld 返回 1

    if i run like this,instead of what i do in the STEP_3 above:
       #gcc -o  ir_test *.o -Wl,-Bstatic  -I/usr/local/include -L/usr/local/lib -lopenobex
    there is still a error:
         /usr/bin/ld: cannot find -lgcc_s
          collect2: ld 返回 1
    Can anyone tell me why and how i should correct the error?Thank you!