winavr - main.c:19: undefined reference to `usbInit' & undefined reference to `usbPoll' -


i faced error in building project using v-usb library.followed code :

#include <avr/io.h> #include <avr/interrupt.h> #include <avr/wdt.h>  #include "usbdrv.h"     #include <util/delay.h>  usb_public uchar usbfunctionsetup(uchar data[8]) {     return 0; // nothing }  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 watchdog happy     _delay_ms(2); } usbdeviceconnect();  sei(); // enable interrupts after re-enumeration  while(1) {     wdt_reset(); // keep watchdog happy     usbpoll(); }  return 0; } 

and relative part in usbdrv.h:

 #ifndef usb_public   #define usb_public   #endif  usb_public void usbinit(void);  usb_public void usbpoll(void) 

can me?

i guess have forgotten add usbdrv-c files makefile or may compiled , have add them lib make file. (but afair v-usb have add c-files)

please read documentation of library , @ numerous examples available v-usb.


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

node.js - How to abort query on demand using Neo4j drivers -