Hi all,
I’ve bought an OSEPP Robotics Kit and have been trying to compile the example code that came with it to make it run. I’ve searched for a solution and have a general understanding of the “multiple definitions error” but can’t seem to understand where this particular error is coming from. Attached are the project files and I’ve copied the error code below. I don’t get any errors until the linking phase of the compile. I’m sure its a fairly easy fix, and I apologize but I’m just trying to learn. Thank you all for your time.
Arduino: 1.8.12 (Linux), Board: “Arduino Uno”
/tmp/arduino_build_148969/libraries/OSEPP_Robotics_101K/irfollower.cpp.o (symbol from plugin): In function IRFollower::IRFollower(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)': (.text+0x0): multiple definition of
IRFollower::IRFollower(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)’
/tmp/arduino_build_148969/sketch/irfollower.cpp.o (symbol from plugin):(.text+0x0): first defined here
/tmp/arduino_build_148969/libraries/OSEPP_Robotics_101K/irfollower.cpp.o (symbol from plugin): In function IRFollower::IRFollower(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)': (.text+0x0): multiple definition of
IRFollower::IRFollower(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)’
/tmp/arduino_build_148969/sketch/irfollower.cpp.o (symbol from plugin):(.text+0x0): first defined here
/tmp/arduino_build_148969/libraries/OSEPP_Robotics_101K/irfollower.cpp.o (symbol from plugin): In function IRFollower::IRFollower(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)': (.text+0x0): multiple definition of
IRFollower::readDegrees()’
/tmp/arduino_build_148969/sketch/irfollower.cpp.o (symbol from plugin):(.text+0x0): first defined here
/tmp/arduino_build_148969/libraries/OSEPP_Robotics_101K/irfollower.cpp.o (symbol from plugin): In function IRFollower::IRFollower(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)': (.text+0x0): multiple definition of
IRFollower::forwardWeight’
/tmp/arduino_build_148969/sketch/irfollower.cpp.o (symbol from plugin):(.text+0x0): first defined here
/tmp/arduino_build_148969/libraries/OSEPP_Robotics_101K/irfollower.cpp.o (symbol from plugin): In function IRFollower::IRFollower(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)': (.text+0x0): multiple definition of
IRFollower::innerWeight’
/tmp/arduino_build_148969/sketch/irfollower.cpp.o (symbol from plugin):(.text+0x0): first defined here
/tmp/arduino_build_148969/libraries/OSEPP_Robotics_101K/irfollower.cpp.o (symbol from plugin): In function IRFollower::IRFollower(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)': (.text+0x0): multiple definition of
IRFollower::cornerWeight’
/tmp/arduino_build_148969/sketch/irfollower.cpp.o (symbol from plugin):(.text+0x0): first defined here
/tmp/arduino_build_148969/libraries/OSEPP_Robotics_101K/motor.cpp.o (symbol from plugin): In function Motor::Motor(unsigned char, unsigned char, unsigned char)': (.text+0x0): multiple definition of
Motor::Motor(unsigned char, unsigned char, unsigned char)’
/tmp/arduino_build_148969/sketch/motor.cpp.o (symbol from plugin):(.text+0x0): first defined here
/tmp/arduino_build_148969/libraries/OSEPP_Robotics_101K/motor.cpp.o (symbol from plugin): In function Motor::Motor(unsigned char, unsigned char, unsigned char)': (.text+0x0): multiple definition of
Motor::Motor(unsigned char, unsigned char, unsigned char)’
/tmp/arduino_build_148969/sketch/motor.cpp.o (symbol from plugin):(.text+0x0): first defined here
/tmp/arduino_build_148969/libraries/OSEPP_Robotics_101K/motor.cpp.o (symbol from plugin): In function Motor::Motor(unsigned char, unsigned char, unsigned char)': (.text+0x0): multiple definition of
Motor::forward(unsigned char)’
/tmp/arduino_build_148969/sketch/motor.cpp.o (symbol from plugin):(.text+0x0): first defined here
/tmp/arduino_build_148969/libraries/OSEPP_Robotics_101K/motor.cpp.o (symbol from plugin): In function Motor::Motor(unsigned char, unsigned char, unsigned char)': (.text+0x0): multiple definition of
Motor::backward(unsigned char)’
/tmp/arduino_build_148969/sketch/motor.cpp.o (symbol from plugin):(.text+0x0): first defined here
/tmp/arduino_build_148969/libraries/OSEPP_Robotics_101K/motor.cpp.o (symbol from plugin): In function Motor::Motor(unsigned char, unsigned char, unsigned char)': (.text+0x0): multiple definition of
Motor::brake()’
/tmp/arduino_build_148969/sketch/motor.cpp.o (symbol from plugin):(.text+0x0): first defined here
/tmp/arduino_build_148969/libraries/OSEPP_Robotics_101K/motor.cpp.o (symbol from plugin): In function Motor::Motor(unsigned char, unsigned char, unsigned char)': (.text+0x0): multiple definition of
Motor::freeRun()’
/tmp/arduino_build_148969/sketch/motor.cpp.o (symbol from plugin):(.text+0x0): first defined here
/tmp/cccF8H5H.ltrans0.ltrans.o: In function setup': /tmp/arduino_modified_sketch_844792/Robot_Complete.ino:125: undefined reference to
IRrecv::enableIRIn()’
/tmp/cccF8H5H.ltrans0.ltrans.o: In function loop': /tmp/arduino_modified_sketch_844792/Robot_Complete.ino:196: undefined reference to
IRrecv::decode(decode_results*)’
/tmp/arduino_modified_sketch_844792/Robot_Complete.ino:216: undefined reference to IRrecv::resume()' /tmp/cccF8H5H.ltrans0.ltrans.o: In function
__static_initialization_and_destruction_0’:
/tmp/arduino_modified_sketch_844792/Robot_Complete.ino:94: undefined reference to `IRrecv::IRrecv(int)’
collect2: error: ld returned 1 exit status
Using library OSEPP_Robotics_101K in folder: /home/pi/Arduino/libraries/OSEPP_Robotics_101K (legacy)
exit status 1
Error compiling for board Arduino Uno.
codes.h (580 Bytes)
irfollower.cpp (2.95 KB)
irfollower.h (1.59 KB)
motor.cpp (2.49 KB)
motor.h (1.45 KB)
Robot_Complete.ino (9.41 KB)