olikraus / m2tklib

Automatically exported from code.google.com/p/m2tklib
Other
49 stars 11 forks source link

fail to compile arduino 022 version 1.10 for u8g #109

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Every example fails with:

"In file included from 
C:\arduino-0022\hardware\arduino\cores\arduino/WProgram.h:6,
                 from C:\arduino-0022\libraries\M2tklib\utility\m2ghserial.cpp:28:
c:/arduino-0022/hardware/tools/avr/lib/gcc/../../avr/include/math.h:439: error: 
expected unqualified-id before 'double'
c:/arduino-0022/hardware/tools/avr/lib/gcc/../../avr/include/math.h:439: error: 
expected `)' before 'double'
c:/arduino-0022/hardware/tools/avr/lib/gcc/../../avr/include/math.h:439: error: 
expected `)' before 'double'
"

Original issue reported on code.google.com by caei...@gmail.com on 6 May 2013 at 11:31

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Will it compile with Arduino 1.0.x?

I do not test 0022 any more....

Original comment by olikr...@gmail.com on 10 May 2013 at 1:16

GoogleCodeExporter commented 9 years ago

Original comment by olikr...@gmail.com on 31 Oct 2013 at 4:09

GoogleCodeExporter commented 9 years ago
Oliver,
It could be that a newer version of avr-libC is being used.
Here is a "known" issue from openGLCD:
==============================

    0019,0020,0021, 0022, 0023 pre 1.x IDEs won't work with newer versions of avr-libC
        new <util/delay.h> uses math.h and Arduino core code breaks math.h 

The solution to this is to either:

comment out #include <avr/delay.h> in wiring_private.h (none of the core code 
uses/needs it)

Or if wanting to make util/delay functions available: must add #include 
<math.h> to top of wiring.h since wiring.h #defines the math functions and 
breaks math.h Because of this, math.h must be included before defines stomp on 
math functions

==============================
It is a core code issue. They never should have redefined all the math 
functions.
And because they did, they periodically "break".
If this is the issue, there is no work around that can be done in the library.
The user will have to modify the core code header files.

--- bill

Original comment by bperry...@gmail.com on 29 Dec 2013 at 9:11

GoogleCodeExporter commented 9 years ago
Thanks for looking at the issues here, Bill
Good background information also.

I personally think that i will not do any further action here...

Original comment by olikr...@gmail.com on 29 Dec 2013 at 9:52