Error to include ofxKinect (from ofTheo)

Greetings

I’m new at openframeworks development, at the moment. I have a problem when run any example with ofxKinect that download from https://github.com/ofTheo/ofxKinect/

I’m using codeblocks ide and projectGenerator to create a new codeblocks project. I’m using 32bit and 64bit linux.

I do this:

  1. I create a new project with projectGeneartor (including ofxOpenCv and ofxKinect)
  2. open this with codeblocks ide
  3. y click and compile the workspace

and crash the world… I get a list of errors that I don’t know.

The console shows this errors, please help me:

  
  
  
../../../../addons/ofxOpenCv/libs/opencv/lib/linux64/libopencv_core.a(system.o)||In function `cv::tempfile(char const*)':|  
||warning: the use of `tmpnam' is dangerous, better use `mkstemp'|  
obj/x86_64Debug/addons/ofxKinect/libs/libfreenect/usb_libusb10.o||In function `fnusb_num_devices':|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|40|undefined reference to `libusb_get_device_list'|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|48|undefined reference to `libusb_get_device_descriptor'|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|54|undefined reference to `libusb_free_device_list'|  
obj/x86_64Debug/addons/ofxKinect/libs/libfreenect/usb_libusb10.o||In function `fnusb_list_device_attributes':|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|64|undefined reference to `libusb_get_device_list'|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|77|undefined reference to `libusb_get_device_descriptor'|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|89|undefined reference to `libusb_open'|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|96|undefined reference to `libusb_get_string_descriptor_ascii'|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|97|undefined reference to `libusb_close'|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|115|undefined reference to `libusb_free_device_list'|  
obj/x86_64Debug/addons/ofxKinect/libs/libfreenect/usb_libusb10.o||In function `fnusb_init':|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|123|undefined reference to `libusb_init'|  
obj/x86_64Debug/addons/ofxKinect/libs/libfreenect/usb_libusb10.o||In function `fnusb_shutdown':|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|144|undefined reference to `libusb_exit'|  
obj/x86_64Debug/addons/ofxKinect/libs/libfreenect/usb_libusb10.o||In function `fnusb_process_events':|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|152|undefined reference to `libusb_handle_events'|  
obj/x86_64Debug/addons/ofxKinect/libs/libfreenect/usb_libusb10.o||In function `fnusb_process_events_timeout':|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|157|undefined reference to `libusb_handle_events_timeout'|  
obj/x86_64Debug/addons/ofxKinect/libs/libfreenect/usb_libusb10.o||In function `fnusb_open_subdevices':|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|174|undefined reference to `libusb_get_device_list'|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|186|undefined reference to `libusb_get_device_descriptor'|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|197|undefined reference to `libusb_open'|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|205|undefined reference to `libusb_kernel_driver_active'|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|207|undefined reference to `libusb_detach_kernel_driver'|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|210|undefined reference to `libusb_close'|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|216|undefined reference to `libusb_claim_interface'|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|219|undefined reference to `libusb_close'|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|232|undefined reference to `libusb_open'|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|238|undefined reference to `libusb_claim_interface'|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|241|undefined reference to `libusb_close'|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|366|undefined reference to `libusb_free_device_list'|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|378|undefined reference to `libusb_release_interface'|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|379|undefined reference to `libusb_close'|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|382|undefined reference to `libusb_release_interface'|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|383|undefined reference to `libusb_close'|  
obj/x86_64Debug/addons/ofxKinect/libs/libfreenect/usb_libusb10.o||In function `fnusb_close_subdevices':|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|398|undefined reference to `libusb_release_interface'|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|400|undefined reference to `libusb_attach_kernel_driver'|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|402|undefined reference to `libusb_close'|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|406|undefined reference to `libusb_release_interface'|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|407|undefined reference to `libusb_close'|  
obj/x86_64Debug/addons/ofxKinect/libs/libfreenect/usb_libusb10.o||In function `iso_callback':|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|441|undefined reference to `libusb_submit_transfer'|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|489|undefined reference to `libusb_submit_transfer'|  
obj/x86_64Debug/addons/ofxKinect/libs/libfreenect/usb_libusb10.o||In function `fnusb_start_iso':|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|521|undefined reference to `libusb_alloc_transfer'|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|527|undefined reference to `libusb_submit_transfer'|  
obj/x86_64Debug/addons/ofxKinect/libs/libfreenect/usb_libusb10.o||In function `fnusb_stop_iso':|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|550|undefined reference to `libusb_cancel_transfer'|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|555|undefined reference to `libusb_handle_events'|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|559|undefined reference to `libusb_free_transfer'|  
obj/x86_64Debug/addons/ofxKinect/libs/libfreenect/usb_libusb10.o||In function `fnusb_control':|  
/usr/local/openFrameworks-all-os/apps/proyectosFzzio/pruebaOFXKINECT/kinectolin/../../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c|573|undefined reference to `libusb_control_transfer'|  
||=== Build finished: 42 errors, 1 warnings (0 minutes, 1 seconds) ===|  
  
  

Regards,

I solve the problem

The steps I made were:

  1. I opened the codeblocks (if already open, be sure to close all the workspace that was open.
  2. I opened a terminal and run the projectGenerator
  3. Select ofxOpenCV and ofxKinect
  4. create and open the project (to open in codeblocks)
  5. I closed the codeblocks (or at least the project that was generated)
  6. I went to the folder where you saved the project (/ apps / tu_carpeta)
  7. open the file that says config.make and add this line and save:
    # android specific, in case you want to use different optimizations
    USER_LIBS = -lusb-1.0
    USER_LIBS_ARM =
    USER_LIBS_ARM7 =
    USER_LIBS_NEON =
  8. Since the codeblocks open the project that was created.
  9. Go to the folder /addons/ofxKinect/example / src /
  10. main.cpp open, select all content, copy and paste it into the file of the same name within the codeblocks
  11. Repeat for the testApp.h and testApp.cpp
  12. is important that the copy and paste is made in the files from the codeblocks xq first I did not recognized me apart and I just went bone esuviese the application as if empty.
  13. save and compile
  14. I just came out warnings, run him out a window with 3 frames for the images …

Sorry for my english,


Saludos,

Yo tenia el mismo problema pero despues de varias horas de revisar, me di cuenta que habia omitido algo realmente importante.

Los pasos que hice fueron:

  1. Abrí el codeblocks (si ya esta abierto, asegurate de cerrar todo el workspace que estaba abierto.
  2. Abrí una terminal y ejecute el projectGenerator
  3. Seleccione ofxOpenCV y ofxKinect
  4. crear y abrir proyecto (para que se abra en codeblocks)
  5. cerré el codeblocks (o al menos el proyecto que se genero)
  6. me dirigí a la carpeta donde se guardo el proyecto (/apps/tu_carpeta)
  7. abra el archivo que dice config.make y agregue esta linea y guarde:
    # android specific, in case you want to use different optimizations
    USER_LIBS = -lusb-1.0
    USER_LIBS_ARM =
    USER_LIBS_ARM7 =
    USER_LIBS_NEON =
  8. Desde el codeblocks abra el proyecto que se creo.
  9. Vaya a la carpeta de addons/ofxKinect/example/src/
  10. abra main.cpp, seleccione todo el contenido, copie y peguelo en el archivo del mismo nombre dentro del codeblocks
  11. repita lo mismo para los testApp.h y testApp.cpp
  12. es importante que la copia y pegue se haga en los archivos desde el codeblocks xq primero yo lo hice aparte y no me reconocio osea solo me salio como si esuviese la aplicacion vacia.
  13. guarde y compile
  14. solo me salieron warnings, ejecute le sale una ventana con 3 cuadros para las imagenes…