Leonardoventurin / tm1638-library

Automatically exported from code.google.com/p/tm1638-library
4 stars 1 forks source link

virtual function declaration breaks compile for ATtiny85 in IDE 1.0 or younger #29

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Try to compile the TM1640 example for target ATtiny85 board (Arduino-Tiny 
cores)
2.Works with IDE pre-1.0 but not with any version 1.0 or younger
3.

What is the expected output? What do you see instead?
Expect compile without errors, instead get this:
TM1638\TM16XX.cpp.o:(.rodata._ZTV6TM16XX+0x14): undefined reference to 
`__cxa_pure_virtual'

What version of the product are you using? On what operating system?
Any that support TM1640 are the only ones I've tried.

Please provide any additional information below.
Discussion and remedy for the problem here:
http://arduino.cc/forum/index.php?topic=162094.new%3btopicseen#new

Original issue reported on code.google.com by GeoffPSt...@gmail.com on 22 Apr 2013 at 2:10

GoogleCodeExporter commented 9 years ago
The problem is that the virtual function IS a pure virtual function. It should 
work with newer versions (that's why it's on the #ifdef), but apparently 
doesn't work with the ATTiny.

The 16XX is a base for the TM1638 and TM1640 libraries. The sendChar function 
is a pure virtual function because it doesn't have an implementation on the 
TM16XX - only on both the 1638 and 1640 libraries - and hence is a pure virtual 
function.

I don't have the ATtiny85, but I'll try to set up the environment and try it 
out.

Original comment by rjbati...@gmail.com on 22 Apr 2013 at 2:34