I have a computer that is running Windows 7, has the Pololu library installed, and I am using AVR Studio 4. I wrote a quick program to turn the robot, and I can’t see any errors. But when I build it, I get this:
rm -rf 3pitest.o 3pitest.elf dep/* 3pitest.hex 3pitest.eep 3pitest.lss 3pitest.map
Build succeeded with 0 Warnings...
avr-gcc -mmcu=atmega328p -Wall -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT 3pitest.o -MF dep/3pitest.o.d -c ../3pitest.c
avr-gcc -mmcu=atmega328p -Wl,-Map=3pitest.map 3pitest.o -o 3pitest.elf
3pitest.o: In function `main':
C:\Users\David\Desktop\3pi\3pitest\default/../3pitest.c:5: undefined reference to `set_motors'
C:\Users\David\Desktop\3pi\3pitest\default/../3pitest.c:6: undefined reference to `delay_ms'
C:\Users\David\Desktop\3pi\3pitest\default/../3pitest.c:7: undefined reference to `set_motors'
C:\Users\David\Desktop\3pi\3pitest\default/../3pitest.c:8: undefined reference to `delay_ms'
C:\Users\David\Desktop\3pi\3pitest\default/../3pitest.c:9: undefined reference to `set_motors'
make: *** [3pitest.elf] Error 1
Build failed with 5 errors and 0 warnings...
The program is:
#include <pololu/3pi.h>
int main(void)
{
set_motors(255,-255);
delay_ms(1000);
set_motors(0,0);
delay_ms(10);
set_motors(-255,255);
}
If it helps, I have the whole project on my desktop. A zipped version of the file has been attached to this post.
Any help would be appreciated.
3pitest.zip (6.41 KB)