Compile Errors with imported Librarys

Status
Not open for further replies.

lineage

Member
Hello Everyone,


I have some problems with the Arduino IDE i think.

If I try to add a Library (Tested with OctoWS2811, Servo and the i2c_t3 Lib), I always get Compile Errors like this:

Short Error Log:
Code:
  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.
Arduino: 1.0.5-r2 (Windows NT (unknown)), Board: "Teensy 3.1"
master.cpp.o: In function `setup':
E:\CAD\Arduino/master.ino:69: undefined reference to `i2c_t3::begin(i2c_mode, unsigned char, i2c_pins, i2c_pullup, i2c_rate)'
E:\CAD\Arduino/master.ino:70: undefined reference to `Wire'
master.cpp.o: In function `print_i2c_status()':
E:\CAD\Arduino/master.ino:367: undefined reference to `i2c_t3::status()'
master.cpp.o: In function `print_i2c_status':
E:\CAD\Arduino/master.ino:373: undefined reference to `Wire'
master.cpp.o: In function `loop':
E:\CAD\Arduino/master.ino:105: undefined reference to `i2c_t3::beginTransmission(unsigned char)'
E:\CAD\Arduino/master.ino:109: undefined reference to `i2c_t3::write(unsigned char)'
E:\CAD\Arduino/master.ino:113: undefined reference to `i2c_t3::endTransmission()'
E:\CAD\Arduino/master.ino:124: undefined reference to `i2c_t3::beginTransmission(unsigned char)'
E:\CAD\Arduino/master.ino:128: undefined reference to `i2c_t3::endTransmission(i2c_stop)'
E:\CAD\Arduino/master.ino:129: undefined reference to `i2c_t3::requestFrom(unsigned char, unsigned int, i2c_stop)'
E:\CAD\Arduino/master.ino:134: undefined reference to `i2c_t3::available()'
E:\CAD\Arduino/master.ino:141: undefined reference to `i2c_t3::readByte()'
E:\CAD\Arduino/master.ino:139: undefined reference to `i2c_t3::available()'
E:\CAD\Arduino/master.ino:164: undefined reference to `i2c_t3::beginTransmission(unsigned char)'
E:\CAD\Arduino/master.ino:170: undefined reference to `i2c_t3::write(unsigned char)'
E:\CAD\Arduino/master.ino:175: undefined reference to `i2c_t3::endTransmission(i2c_stop)'
E:\CAD\Arduino/master.ino:186: undefined reference to `i2c_t3::beginTransmission(unsigned char)'
E:\CAD\Arduino/master.ino:190: undefined reference to `i2c_t3::endTransmission(i2c_stop)'
E:\CAD\Arduino/master.ino:191: undefined reference to `i2c_t3::requestFrom(unsigned char, unsigned int, i2c_stop)'
E:\CAD\Arduino/master.ino:196: undefined reference to `i2c_t3::available()'
E:\CAD\Arduino/master.ino:200: undefined reference to `Wire'
E:\CAD\Arduino/master.ino:203: undefined reference to `i2c_t3::readByte()'
E:\CAD\Arduino/master.ino:201: undefined reference to `i2c_t3::available()'
E:\CAD\Arduino/master.ino:223: undefined reference to `i2c_t3::beginTransmission(unsigned char)'
E:\CAD\Arduino/master.ino:229: undefined reference to `i2c_t3::write(unsigned char)'
E:\CAD\Arduino/master.ino:234: undefined reference to `i2c_t3::sendTransmission(i2c_stop)'
E:\CAD\Arduino/master.ino:235: undefined reference to `i2c_t3::done()'
E:\CAD\Arduino/master.ino:247: undefined reference to `i2c_t3::beginTransmission(unsigned char)'
E:\CAD\Arduino/master.ino:251: undefined reference to `i2c_t3::endTransmission(i2c_stop)'
E:\CAD\Arduino/master.ino:252: undefined reference to `i2c_t3::sendRequest(unsigned char, unsigned int, i2c_stop)'
E:\CAD\Arduino/master.ino:257: undefined reference to `i2c_t3::finish()'
E:\CAD\Arduino/master.ino:262: undefined reference to `i2c_t3::available()'
E:\CAD\Arduino/master.ino:266: undefined reference to `Wire'
E:\CAD\Arduino/master.ino:269: undefined reference to `i2c_t3::readByte()'
E:\CAD\Arduino/master.ino:267: undefined reference to `i2c_t3::available()'
E:\CAD\Arduino/master.ino:285: undefined reference to `i2c_t3::beginTransmission(unsigned char)'
E:\CAD\Arduino/master.ino:290: undefined reference to `i2c_t3::endTransmission(i2c_stop)'
E:\CAD\Arduino/master.ino:295: undefined reference to `i2c_t3::beginTransmission(unsigned char)'
E:\CAD\Arduino/master.ino:300: undefined reference to `i2c_t3::endTransmission()'
E:\CAD\Arduino/master.ino:305: undefined reference to `i2c_t3::beginTransmission(int)'
E:\CAD\Arduino/master.ino:310: undefined reference to `i2c_t3::endTransmission()'
E:\CAD\Arduino/master.ino:316: undefined reference to `i2c_t3::beginTransmission(unsigned char)'
E:\CAD\Arduino/master.ino:320: undefined reference to `i2c_t3::endTransmission(i2c_stop)'
E:\CAD\Arduino/master.ino:321: undefined reference to `i2c_t3::requestFrom(unsigned char, unsigned int, i2c_stop)'
E:\CAD\Arduino/master.ino:326: undefined reference to `i2c_t3::beginTransmission(unsigned char)'
E:\CAD\Arduino/master.ino:330: undefined reference to `i2c_t3::endTransmission(i2c_stop)'
E:\CAD\Arduino/master.ino:331: undefined reference to `i2c_t3::requestFrom(unsigned char, unsigned int, i2c_stop)'
E:\CAD\Arduino/master.ino:336: undefined reference to `i2c_t3::beginTransmission(unsigned char)'
E:\CAD\Arduino/master.ino:340: undefined reference to `i2c_t3::endTransmission(i2c_stop)'
E:\CAD\Arduino/master.ino:341: undefined reference to `i2c_t3::requestFrom(unsigned char, unsigned int, i2c_stop)'
E:\CAD\Arduino/master.ino:346: undefined reference to `i2c_t3::beginTransmission(int)'
E:\CAD\Arduino/master.ino:350: undefined reference to `i2c_t3::endTransmission(i2c_stop)'
E:\CAD\Arduino/master.ino:351: undefined reference to `i2c_t3::requestFrom(unsigned char, unsigned int, i2c_stop)'
E:\CAD\Arduino/master.ino:358: undefined reference to `Wire'
collect2.exe: error: ld returned 1 exit status

Verbose Output is in the Attachment.
View attachment Verbose Output.txt

I tried to Add the Libs from the IDE (Sketch-> Import Lib....) and manual but I Don't see the mistake i've made.

I use Arduino 1.0.5-r2 and the actual Teensyduino on my Win8 Laptop (not 8.1)


Thanks
lineage
 
Please post your code in code brackets, which can be found in the "go advanced" button.

Quick question: did you download the i2c-t3 library and install it in your libraries directory ?
 
I tried to install it from the IDE and manually in the [...]\Documents\Arduino\libraries - Folder.

Lineage
 
My best guess is your copy of i2c_t3.cpp is corrupted somehow. Perhaps the file is empty, or is really a copy of i2c_t3.h?

From the verbose log, the full pathname is D:\Benutzerdaten\Marcel\Dokumente\Arduino\libraries\i2c_t3\i2c_t3.cpp

I'd recommend you completely delete i2c_t3 from D:\Benutzerdaten\Marcel\Dokumente\Arduino\libraries. Then download a fresh copy. After you install the new files, double check the .cpp and .h files (any text editor can open them). Make sure each has the correct data.

You're also using an old version of Teensyduino. I highly recommend you upgrade to version 1.19. Many bugs have been fixed since version 1.17. Just run the 1.19 installer and allow it to install into Arduino.
 
I updated my Teensyduino to 1.19 and checked the i2c_t3 files, it's Version 5, Teensy 3.1 Support comes with Version 6...so this was my fault.
After the Teensyduino Update everthing seems to work.

Thanks for the Help!
Lineage
 
Status
Not open for further replies.
Back
Top