Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » Linking with usb library
Linking with usb library [message #10258] Thu, 28 June 2007 01:52 Go to previous message
malaugh is currently offline  malaugh
Messages: 7
Registered: June 2007
Promising Member
Forgive my basic questions but I an a newbee at Linux programming and Ultimate++.

I am writing a program that communicates with a USB device. It uses the function usb_init(), usb_open() etc., which are contained in a library called libusb.a in the /usr/lib directory. I wrote a simple console program to test the libary interface

usb_init();
usb_find_busses();
usb_find_devices();
usb_busses = usb_get_busses();
for (bus = usb_busses; bus; bus = bus->next)
{
for (dev = bus->devices; dev; dev = dev->next)
{
printf("idVendor:0x%04x\n",dev->descriptor.idVendor);
printf("idProduct:0x%04x\n",dev-descriptor.idProduct);
}
}
return 0;

I can compile and run this program with the following gcc command:

gcc UsbList.cpp -lusb -lstdc++ -o UsbList

When I try to compile and run it under Ultimate++ I get
linker errors, it cannot find usb_init, usb_find_busses, usb_find_devices, or usb_get_busses.

How to I tell Ultimate++ to link with the usb library?

Thanks


 
Read Message
Read Message
Read Message
Read Message
Previous Topic: shared libraries for debug, static for release ?
Next Topic: How to predefine compiler wide macro from IDE?
Goto Forum:
  


Current Time: Fri May 10 22:14:31 CEST 2024

Total time taken to generate the page: 0.02735 seconds