How do you remove pololuwheelencoders.cpp from project

I’m attempting to add functionality for a 3rd and 4th encoder by modifying the library code as suggested by:


“If you need better control of the interrupts used, or you want to
write a more efficient ISR, you can copy the library code from
PololuWheelEncoders.cpp into your own project and modify it as
necessary.”

However, when I attempt to compile my code, the original ISR and function definitions are still there. I get the error:
multiple definition of `__vector_7’ orangutan_app5 C:\home\david\libpololu-avr\src\PololuWheelEncoders\PololuWheelEncoders.cpp 256

I have removed all of the includes for wheel encoders functionality so that my includes list is as follows:

#include <avr/io.h>
#include <avr/interrupt.h>
#include <stdlib.h>
#include "pololu/OrangutanDigital/OrangutanDigital.h"
#include "pololu/OrangutanMotors/OrangutanMotors.h"
#include "pololu/OrangutanLCD/OrangutanLCD.h"
#include "pololu/OrangutanTime/OrangutanTime.h"
#include "pololu/workaround.h"//#include <pololu/orangutan.h>

What am I missing here?

Hello.

What programming environment are you using, and which board are you trying to program (e.g. Orangutan SVP, Baby Orangutan)? Can you post the full avr-gcc command that caused the error? Also, can you attach your entire project as a ZIP file, containing the configuration files as well as the modified PololuWheelEncoders.cpp?

- Amanda

Amanda thank you for your prompt reply. The problem was fixed by starting a new project in Atmel studio and pasting my main.c file in. The headers remain unchanged. PololuWheelEncoders has many nice features under the hood including setting pins up for pin change interrupt just by port and pin number. I was able to keep that functionality, and build upon it; you just have to be careful about all the dependencies and only include the headers that are needed for a particular program.

That’s great! I am glad you figured out the problem and fixed it; thank you for letting us know.

- Amanda