I'm trying to compile an usb camera driver for debian, but when I run make command I'm getting some errors. Below you can see the output:
cd ./pco_classes && make
make[1]: Entering directory '/home/gm/PCO/pco_camera/pco_usb/pco_classes'
g++ -O2 -Wall -DLINUX -fPIC -I../../pco_common/pco_include -I../../pco_common/pco_classes -I/usr/include/libusb-1.0 -c ../../pco_common/pco_classes/Cpco_com.cpp -o Cpco_com.o
g++ -O2 -Wall -DLINUX -fPIC -I../../pco_common/pco_include -I../../pco_common/pco_classes -I/usr/include/libusb-1.0 -c ../../pco_common/pco_classes/Cpco_com_func.cpp -o Cpco_com_func.o
g++ -O2 -Wall -DLINUX -fPIC -I../../pco_common/pco_include -I../../pco_common/pco_classes -I/usr/include/libusb-1.0 -c ../../pco_common/pco_classes/Cpco_com_func_2.cpp -o Cpco_com_func_2.o
g++ -O2 -Wall -DLINUX -fPIC -I../../pco_common/pco_include -I../../pco_common/pco_classes -I/usr/include/libusb-1.0 -c Cpco_com_usb.cpp -o Cpco_com_usb.o
ld -r -s -L../../pco_common/pco_lib Cpco_com.o Cpco_com_func.o Cpco_com_func_2.o Cpco_com_usb.o -o ../../pco_common/pco_lib/libpcocom_usb.a
cc -shared -Wl,-soname,libpcocom_usb.so.1 -Wl,-L../../pco_common/pco_lib \
-o ../../pco_common/pco_libdyn/libpcocom_usb.so.1.1.12 Cpco_com.o Cpco_com_func.o Cpco_com_func_2.o Cpco_com_usb.o
g++ -O2 -Wall -DLINUX -fPIC -I../../pco_common/pco_include -I../../pco_common/pco_classes -I/usr/include/libusb-1.0 -c Cpco_grab_usb.cpp -o Cpco_grab_usb.o
ld -r -s -L../../pco_common/pco_lib Cpco_com.o Cpco_com_func.o Cpco_com_func_2.o Cpco_com_usb.o Cpco_grab_usb.o -o ../../pco_common/pco_lib/libpcocam_usb.a
cc -shared -Wl,-soname,libpcocam_usb.so.1 -Wl,-L../../pco_common/pco_lib \
-o ../../pco_common/pco_libdyn/libpcocam_usb.so.1.1.12 Cpco_com.o Cpco_com_func.o Cpco_com_func_2.o Cpco_com_usb.o Cpco_grab_usb.o
make[1]: Leaving directory '/home/gm/PCO/pco_camera/pco_usb/pco_classes'
./symlink_pco
10 files found in ../pco_common/pco_libdyn
create symlinks to libpcocam_clhs.so.1.2.02
create symlinks to libpcocam_usb.so.1.1.12
create symlinks to libpcoclhs.so.1.02.02
create symlinks to libpcocnv.so.1.01.08
create symlinks to libpcocom_clhs.so.1.2.02
create symlinks to libpcocom_usb.so.1.1.12
create symlinks to libpcodisp.so.1.01.08
create symlinks to libpcofile.so.1.01.08
create symlinks to libpcolog.so.1.01.08
create symlinks to libreorderfunc.so.1.01.08
cd ./pco_camera_grab && make
make[1]: Entering directory '/home/gm/PCO/pco_camera/pco_usb/pco_camera_grab'
g++ -O2 -Wall -DLINUX -I../../pco_common/pco_include -I../../pco_common/pco_classes -I../pco_classes -L../../pco_common/pco_lib pco_camera_grab.cpp -o pco_camera_grab -lusb-1.0 -lpthread -lrt -ldl -lpcolog -lpcofile -lreorderfunc -lpcocam_usb
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Close_Cam()':
(.text+0x80b2): undefined reference to `sem_close'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Close_Cam()':
(.text+0x80ba): undefined reference to `sem_destroy'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Close_Cam()':
(.text+0x80fe): undefined reference to `libusb_reset_device'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Close_Cam()':
(.text+0x8138): undefined reference to `libusb_release_interface'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Close_Cam()':
(.text+0x8151): undefined reference to `libusb_free_config_descriptor'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Close_Cam()':
(.text+0x818b): undefined reference to `libusb_close'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Close_Cam()':
(.text+0x81ca): undefined reference to `libusb_exit'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::~CPco_com_usb()':
(.text+0x8290): undefined reference to `libusb_exit'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::usb_clear_input()':
(.text+0x83d3): undefined reference to `libusb_bulk_transfer'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::usb_read(void*, int*, unsigned int)':
(.text+0x85de): undefined reference to `libusb_bulk_transfer'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::usb_read(void*, int*, unsigned int)':
(.text+0x8660): undefined reference to `libusb_bulk_transfer'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::usb_read(void*, int*, unsigned int)':
(.text+0x86cf): undefined reference to `libusb_error_name'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::usb_read(void*, int*, unsigned int)':
(.text+0x8703): undefined reference to `libusb_error_name'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::usb_write(void*, int*, unsigned int)':
(.text+0x87ef): undefined reference to `libusb_bulk_transfer'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::usb_write(void*, int*, unsigned int)':
(.text+0x8873): undefined reference to `libusb_error_name'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::usb_write(void*, int*, unsigned int)':
(.text+0x88c0): undefined reference to `libusb_bulk_transfer'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::usb_write(void*, int*, unsigned int)':
(.text+0x88cd): undefined reference to `libusb_error_name'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::usb_get_endpoints()':
(.text+0x8949): undefined reference to `libusb_get_device'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::usb_get_endpoints()':
(.text+0x8956): undefined reference to `libusb_get_device_descriptor'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::usbcom_out(unsigned short, unsigned int, unsigned int)':
(.text+0x8c5d): undefined reference to `sem_post'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Control_Command(void*, unsigned int, void*, unsigned int)':
(.text+0x8cf8): undefined reference to `sem_timedwait'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Open_Cam_Ext(unsigned int, _SC2_OpenStruct*)':
(.text+0x950a): undefined reference to `sem_init'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Open_Cam_Ext(unsigned int, _SC2_OpenStruct*)':
(.text+0x9590): undefined reference to `libusb_init'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Open_Cam_Ext(unsigned int, _SC2_OpenStruct*)':
(.text+0x95c3): undefined reference to `libusb_get_version'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Open_Cam_Ext(unsigned int, _SC2_OpenStruct*)':
(.text+0x9606): undefined reference to `libusb_get_device_list'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Open_Cam_Ext(unsigned int, _SC2_OpenStruct*)':
(.text+0x96a4): undefined reference to `libusb_get_device_descriptor'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Open_Cam_Ext(unsigned int, _SC2_OpenStruct*)':
(.text+0x96b3): undefined reference to `libusb_error_name'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Open_Cam_Ext(unsigned int, _SC2_OpenStruct*)':
(.text+0x979f): undefined reference to `libusb_open'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Open_Cam_Ext(unsigned int, _SC2_OpenStruct*)':
(.text+0x97b1): undefined reference to `libusb_free_device_list'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Open_Cam_Ext(unsigned int, _SC2_OpenStruct*)':
(.text+0x97c7): undefined reference to `libusb_get_device_descriptor'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Open_Cam_Ext(unsigned int, _SC2_OpenStruct*)':
(.text+0x97eb): undefined reference to `libusb_get_device_speed'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Open_Cam_Ext(unsigned int, _SC2_OpenStruct*)':
(.text+0x985e): undefined reference to `libusb_get_config_descriptor'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Open_Cam_Ext(unsigned int, _SC2_OpenStruct*)':
(.text+0x98a4): undefined reference to `libusb_set_auto_detach_kernel_driver'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Open_Cam_Ext(unsigned int, _SC2_OpenStruct*)':
(.text+0x98b2): undefined reference to `libusb_claim_interface'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Open_Cam_Ext(unsigned int, _SC2_OpenStruct*)':
(.text+0x98ff): undefined reference to `libusb_set_interface_alt_setting'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Open_Cam_Ext(unsigned int, _SC2_OpenStruct*)':
(.text+0x9924): undefined reference to `libusb_error_name'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Open_Cam_Ext(unsigned int, _SC2_OpenStruct*)':
(.text+0x9952): undefined reference to `libusb_free_config_descriptor'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Open_Cam_Ext(unsigned int, _SC2_OpenStruct*)':
(.text+0x9969): undefined reference to `libusb_close'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Open_Cam_Ext(unsigned int, _SC2_OpenStruct*)':
(.text+0x9980): undefined reference to `libusb_exit'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Open_Cam_Ext(unsigned int, _SC2_OpenStruct*)':
(.text+0x99a3): undefined reference to `libusb_error_name'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Open_Cam_Ext(unsigned int, _SC2_OpenStruct*)':
(.text+0x99dc): undefined reference to `libusb_error_name'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Open_Cam_Ext(unsigned int, _SC2_OpenStruct*)':
(.text+0x9a0a): undefined reference to `libusb_exit'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Open_Cam_Ext(unsigned int, _SC2_OpenStruct*)':
(.text+0x9a2c): undefined reference to `libusb_error_name'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Open_Cam_Ext(unsigned int, _SC2_OpenStruct*)':
(.text+0x9a80): undefined reference to `libusb_free_device_list'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Open_Cam_Ext(unsigned int, _SC2_OpenStruct*)':
(.text+0x9a8c): undefined reference to `libusb_exit'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Open_Cam_Ext(unsigned int, _SC2_OpenStruct*)':
(.text+0x9ab0): undefined reference to `libusb_reset_device'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Open_Cam_Ext(unsigned int, _SC2_OpenStruct*)':
(.text+0x9ae3): undefined reference to `libusb_error_name'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Open_Cam_Ext(unsigned int, _SC2_OpenStruct*)':
(.text+0x9b3e): undefined reference to `libusb_error_name'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Open_Cam_Ext(unsigned int, _SC2_OpenStruct*)':
(.text+0x9b6c): undefined reference to `libusb_close'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Open_Cam_Ext(unsigned int, _SC2_OpenStruct*)':
(.text+0x9b78): undefined reference to `libusb_exit'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Open_Cam_Ext(unsigned int, _SC2_OpenStruct*)':
(.text+0x9b94): undefined reference to `libusb_error_name'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_com_usb::Open_Cam_Ext(unsigned int, _SC2_OpenStruct*)':
(.text+0x9c3a): undefined reference to `libusb_error_name'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_grab_usb::Close_Grabber()':
(.text+0xa313): undefined reference to `libusb_free_transfer'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_grab_usb::Close_Grabber()':
(.text+0xa365): undefined reference to `libusb_reset_device'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_grab_usb::Close_Grabber()':
(.text+0xa37b): undefined reference to `libusb_close'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_grab_usb::Close_Grabber()':
(.text+0xa392): undefined reference to `libusb_exit'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_grab_usb::Close_Grabber()':
(.text+0xa456): undefined reference to `libusb_free_transfer'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_grab_usb::usb_get_endpoints()':
(.text+0xa8c4): undefined reference to `libusb_get_device'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_grab_usb::usb_get_endpoints()':
(.text+0xa8d4): undefined reference to `libusb_get_device_descriptor'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_grab_usb::usb_get_endpoints()':
(.text+0xa8e1): undefined reference to `libusb_error_name'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_grab_usb::usb_get_endpoints()':
(.text+0xa93b): undefined reference to `libusb_get_config_descriptor'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_grab_usb::usb_get_endpoints()':
(.text+0xaa4b): undefined reference to `libusb_error_name'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_grab_usb::usb_get_endpoints()':
(.text+0xaa94): undefined reference to `libusb_free_config_descriptor'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_grab_usb::usb_clear_input()':
(.text+0xacab): undefined reference to `libusb_bulk_transfer'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_grab_usb::Set_Grabber_Size(int, int, int)':
(.text+0xae89): undefined reference to `libusb_alloc_transfer'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_grab_usb::Set_Grabber_Size(int, int, int)':
(.text+0xb02f): undefined reference to `libusb_free_transfer'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_grab_usb::usb_read_image(void*, int, unsigned int, unsigned short, unsigned int)':
(.text+0xb450): undefined reference to `libusb_bulk_transfer'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_grab_usb::usb_read_image(void*, int, unsigned int, unsigned short, unsigned int)':
(.text+0xb4c9): undefined reference to `pthread_create'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_grab_usb::usb_read_image(void*, int, unsigned int, unsigned short, unsigned int)':
(.text+0xb6fa): undefined reference to `pthread_join'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_grab_usb::usb_read_image(void*, int, unsigned int, unsigned short, unsigned int)':
(.text+0xb763): undefined reference to `libusb_error_name'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_grab_usb::usb_read_image(void*, int, unsigned int, unsigned short, unsigned int)':
(.text+0xb7da): undefined reference to `libusb_bulk_transfer'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_grab_usb::usb_read_image(void*, int, unsigned int, unsigned short, unsigned int)':
(.text+0xb8e0): undefined reference to `libusb_bulk_transfer'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_grab_usb::usb_read_image(void*, int, unsigned int, unsigned short, unsigned int)':
(.text+0xb9fc): undefined reference to `libusb_error_name'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_grab_usb::usb_async_image(void*, int, unsigned int, bool)':
(.text+0xbc1d): undefined reference to `libusb_handle_events_timeout'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_grab_usb::usb_async_image(void*, int, unsigned int, bool)':
(.text+0xbd01): undefined reference to `libusb_submit_transfer'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_grab_usb::usb_async_image(void*, int, unsigned int, bool)':
(.text+0xbe62): undefined reference to `libusb_handle_events_timeout'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_grab_usb::usb_async_image(void*, int, unsigned int, bool)':
(.text+0xbf63): undefined reference to `libusb_error_name'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_grab_usb::usb_async_image(void*, int, unsigned int, bool)':
(.text+0xc023): undefined reference to `libusb_cancel_transfer'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_grab_usb::usb_async_image(void*, int, unsigned int, bool)':
(.text+0xc036): undefined reference to `libusb_handle_events_timeout'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_grab_usb::usb_async_image(void*, int, unsigned int, bool)':
(.text+0xc0b8): undefined reference to `libusb_bulk_transfer'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_grab_usb::usb_async_image(void*, int, unsigned int, bool)':
(.text+0xc12a): undefined reference to `pthread_join'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_grab_usb::usb_async_image(void*, int, unsigned int, bool)':
(.text+0xc374): undefined reference to `libusb_cancel_transfer'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_grab_usb::usb_async_image(void*, int, unsigned int, bool)':
(.text+0xc431): undefined reference to `libusb_submit_transfer'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_grab_usb::usb_async_image(void*, int, unsigned int, bool)':
(.text+0xc4c0): undefined reference to `libusb_submit_transfer'
../../pco_common/pco_lib/libpcocam_usb.a: In function `CPco_grab_usb::async_callback(libusb_transfer*)':
(.text+0xc710): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
Makefile:40: recipe for target 'pco_camera_grab' failed
make[1]: *** [pco_camera_grab] Error 1
make[1]: Leaving directory '/home/gm/PCO/pco_camera/pco_usb/pco_camera_grab'
Makefile:17: recipe for target 'pco_camera_grab' failed
make: *** [pco_camera_grab] Error 2
I installed the libusb packge with sudo apt-get install libusb-1.0-0-dev. I'm using Linux Mint 18.1 Cinnamon 64-bit. Kernel 4.4.0-53-generic.
Here is the link with the driver: https://www.dropbox.com/s/wwqrvltlwuyny1d/usb_driver.tar.gz?dl=0
Could you help me to solve it?
Regards,
Gabriel.