Pages: [1]   Go Down
Author Topic: Virtual Wire compile error  (Read 2290 times)
0 Members and 1 Guest are viewing this topic.
Sweden, Malmö
Offline Offline
Full Member
***
Karma: 2
Posts: 200
Rooky
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

When i try to compile one of the virtual wire examples from the download library at http://www.open.com.au/mikem/arduino/VirtualWire-1.3.zip
i get following error message, something wrong in the library or could it be just my fault?

Code:
In file included from C:\Program Files\Arduino\arduino-0015\hardware\cores\arduino/WProgram.h:6,


c:/program files/arduino/arduino-0015/hardware/tools/avr/lib/gcc/../../avr/include/math.h:439: error: expected unqualified-id before 'double'


c:/program files/arduino/arduino-0015/hardware/tools/avr/lib/gcc/../../avr/include/math.h:439: error: expected `)' before 'double'


c:/program files/arduino/arduino-0015/hardware/tools/avr/lib/gcc/../../avr/include/math.h:439: error: expected `)' before 'double'

« Last Edit: July 18, 2009, 08:42:44 am by HULK » Logged

New Zealand
Offline Offline
God Member
*****
Karma: 0
Posts: 999
Arduino pebbles
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

AFAIK it's the same error introduced by a change in Arduino-0015 I'm pretty sure the fix has been covered in the forums.

--Phil.
Logged

Sweden, Malmö
Offline Offline
Full Member
***
Karma: 2
Posts: 200
Rooky
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Strange is that i have the same error with Arduino-0012 and 0014?

Code:
In file included from C:\Program Files\Arduino\arduino-0012\hardware\cores\arduino/WProgram.h:6,


c:/program files/arduino/arduino-0012/hardware/tools/avr/lib/gcc/../../avr/include/math.h:439: error: expected unqualified-id before 'double'


c:/program files/arduino/arduino-0012/hardware/tools/avr/lib/gcc/../../avr/include/math.h:439: error: expected `)' before 'double'


c:/program files/arduino/arduino-0012/hardware/tools/avr/lib/gcc/../../avr/include/math.h:439: error: expected `)' before 'double'


Logged

Sweden, Malmö
Offline Offline
Full Member
***
Karma: 2
Posts: 200
Rooky
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Made a search on th error "math.h:439" and found no solution to it, only one post by somebody else that notice the issue.

I also removed the o-file in the library to be sure that it as not that messing up things but no change.
Logged

New Zealand
Offline Offline
God Member
*****
Karma: 0
Posts: 999
Arduino pebbles
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Try searching the forums (with Google) for "expected unqualified-id before".

--Phil.
Logged

Sweden, Malmö
Offline Offline
Full Member
***
Karma: 2
Posts: 200
Rooky
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Now i got it right.
Adding this to the code before compiling did solve the issue.

Code:
#undef int
#undef abs
#undef double
#undef float
#undef round

Thanks Phil
« Last Edit: July 19, 2009, 04:25:26 am by HULK » Logged

0
Offline Offline
Jr. Member
**
Karma: 2
Posts: 81
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You should not see this error with arduino-0016 or later.
Logged

Sweden, Malmö
Offline Offline
Full Member
***
Karma: 2
Posts: 200
Rooky
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Almost works with IDE 16 .
Error code i get is:

Code:
c:/program files/arduino/arduino-0016/hardware/tools/avr/lib/gcc/../../avr/include/math.h:439: error: expected `)' before 'double'


c:/program files/arduino/arduino-0016/hardware/tools/avr/lib/gcc/../../avr/include/math.h:439: error: expected `)' before 'double'

Need to add only :
Code:
#undef round
Logged

Pages: [1]   Go Up
Jump to: