![]() |
| | #1 | |
| Registered User Join Date: Dec 2008
Posts: 2
| libusb headache First post, so do be gentle. ![]() I am trying to get libusb to work w/ my compiler and all seems fine until I try something like: Code: #include <usb.h>
int main(int argc, char **argv) {
struct usb_bus *busses;
usb_init();
usb_find_busses();
usb_find_devices();
busses = usb_get_busses();
return 0;
}
Quote:
Code: **** Build of configuration Debug for project usb **** make -k all Building file: ../main.c Invoking: GCC C Compiler gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"main.d" -MT"main.d" -o"main.o" "../main.c" Finished building: ../main.c Building target: usb Invoking: GCC C Linker gcc -o"usb" ./main.o ./main.o: In function `main': /home/cbee/c/usb/Debug/../main.c:6: undefined reference to `usb_init' /home/cbee/c/usb/Debug/../main.c:7: undefined reference to `usb_find_busses' /home/cbee/c/usb/Debug/../main.c:8: undefined reference to `usb_find_devices' /home/cbee/c/usb/Debug/../main.c:9: undefined reference to `usb_get_busses' collect2: ld returned 1 exit status make: *** [usb] Error 1 make: Target `all' not remade because of errors. Build complete for project usb | |
| cbee is offline | |
| | #2 |
| critical genius Join Date: Jul 2008 Location: SE Queens
Posts: 5,175
| Sometimes these things require additional options to gcc, as with gtk+ and pkg-config. I've never used libusb tho, so I don't know. |
| MK27 is online now | |
| | #3 |
| Registered User Join Date: Dec 2008
Posts: 2
| Yep, I resolved it of course almost after my post. Here is the solution w/ screenshots: http://ubuntuforums.org/showthread.php?p=6297589 Thank you to anyone who spent time looking and thinking it out on my behalf. |
| cbee is offline | |
![]() |
| Tags |
| eclipse, error, libusb, ubuntu |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Header File Headache | Bladactania | C Programming | 12 | 02-11-2009 06:54 AM |
| API Thread HEADACHE | WaterNut | Windows Programming | 11 | 01-16-2007 10:10 AM |
| I/O headache | Strait | C++ Programming | 5 | 02-04-2005 12:20 PM |
| My headache | Morgan | C Programming | 7 | 12-03-2002 03:33 AM |
| Linked List headache | Unregistered | C++ Programming | 0 | 09-23-2001 06:42 PM |