rather than post the library here the library I am using is V-USB full specs of which are here
The library is downloaded and part of it (one directory "usbdrv") is placed in your sketchbook /library folder which then makes available the ".c" and ".h" files . You copy "usbconfig-prototype.h" and make a configuration file for yourself which is "usbconfig.h" which is also saved in that folder.
The program I am trying to compile is
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/wdt.h>
#include "usbdrv.h"
#define F_CPU 16000000L
#include <util/delay.h>
USB_PUBLIC uchar usbFunctionSetup(uchar data[8]) {
return 0; // do nothing for now
}
int main() {
uchar i;
wdt_enable(WDTO_1S); // enable 1s watchdog timer
usbInit();
usbDeviceDisconnect(); // enforce re-enumeration
for(i = 0; i<250; i++) { // wait 500 ms
wdt_reset(); // keep the watchdog happy
_delay_ms(2);
}
usbDeviceConnect();
sei(); // Enable interrupts after re-enumeration
while(1) {
wdt_reset(); // keep the watchdog happy
usbPoll();
}
return 0;
}
The problem I get is
VUSBExample1.cpp.o: In function main': VUSBExample1.cpp:22: undefined reference to usbInit()'
VUSBExample1.cpp:35: undefined reference to `usbPoll()'
http://forums.obdev.at/viewforum.php?f=8 I have a post there but it does not seem to get much response because they are not interested in Arduino IDE . They program direct to the chip.
It must be possible with Arduino I just need some knowlegeable person to look closely at the error and point me in the right direction.