Hi, I just found your library and tutorial. I am an experienced developer but haven't worked with Eclipse before so this error may be my own. However, after following the tutorial, deleting the project and starting from scratch a couple times (just in case it was something I missed). I have updated Arduino studio to the latest version and I still receive the following errors when I attempt to compile the ArduinoCore (Note - The code in the file actually looks fine to me, containing balanced parentheses, etc...):
Thanks in advance for you help with this issue
Problems Tab Output:
Description Resource Path Location Type
expected ‘)’ before ‘double’ ArduinoCore line 426, external location: /usr/lib/avr/include/math.h C/C++ Problem
expected unqualified-id before ‘double’ ArduinoCore line 426, external location: /usr/lib/avr/include/math.h C/C++ Problem
make: *** [HardwareSerial.o] Error 1 ArduinoCore C/C++ Problem
The eclipse console output is:
/usr/bin/avr-g++ -E -P -v -dD /home/randy/workspace/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp -mmcu=atmega328p -DF_CPU=16000000UL
define STDC 1
Using built-in specs.
define __cplusplus 1
COLLECT_GCC=/usr/bin/avr-g++
define STDC_HOSTED 1
COLLECT_LTO_WRAPPER=/usr/lib/gcc/avr/4.5.3/lto-wrapper
Target: avr
define GNUC 4
Configured with: ../src/configure -v --enable-languages=c,c++ --prefix=/usr/lib --infodir=/usr/share/info --mandir=/usr/share/man --bindir=/usr/bin --libexecdir=/usr/lib --libdir=/usr/lib --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-libssp --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=avr
define GNUC_MINOR 5
Thread model: single
define GNUC_PATCHLEVEL 3
gcc version 4.5.3 (GCC)
define GNUG 4
COLLECT_GCC_OPTIONS='-E' '-P' '-v' '-dD' '-mmcu=atmega328p' '-DF_CPU=16000000UL'
/usr/lib/gcc/avr/4.5.3/cc1plus -E -quiet -v -P -imultilib avr5 -DF_CPU=16000000UL /home/randy/workspace/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp -mmcu=atmega328p -fno-rtti -fno-enforce-eh-specs -fno-exceptions -dD
ignoring nonexistent directory "/usr/lib/gcc/avr/4.5.3/../../../avr/include/c++/4.5.3"
ignoring nonexistent directory "/usr/lib/gcc/avr/4.5.3/../../../avr/include/c++/4.5.3/avr/avr5"
ignoring nonexistent directory "/usr/lib/gcc/avr/4.5.3/../../../avr/include/c++/4.5.3/backward"
ignoring nonexistent directory "/usr/lib/gcc/avr/4.5.3/../../../avr/sys-include"
include "..." search starts here:
include <...> search starts here:
/usr/lib/gcc/avr/4.5.3/include
/usr/lib/gcc/avr/4.5.3/include-fixed
/usr/lib/gcc/avr/4.5.3/../../../avr/include
End of search list.
define SIZE_TYPE unsigned int
COMPILER_PATH=/usr/lib/gcc/avr/4.5.3/:/usr/lib/gcc/avr/4.5.3/:/usr/lib/gcc/avr/:/usr/lib/gcc/avr/4.5.3/:/usr/lib/gcc/avr/:/usr/lib/gcc/avr/4.5.3/../../../avr/bin/
define PTRDIFF_TYPE int
LIBRARY_PATH=/usr/lib/gcc/avr/4.5.3/avr5/:/usr/lib/gcc/avr/4.5.3/../../../avr/lib/avr5/:/usr/lib/gcc/avr/4.5.3/:/usr/lib/gcc/avr/4.5.3/../../../avr/lib/
define WCHAR_TYPE int
COLLECT_GCC_OPTIONS='-E' '-P' '-v' '-dD' '-mmcu=atmega328p' '-DF_CPU=16000000UL'
define WINT_TYPE unsigned int
define INTMAX_TYPE long long int
define UINTMAX_TYPE long long unsigned int
define CHAR16_TYPE short unsigned int
define CHAR32_TYPE long unsigned int
define SIG_ATOMIC_TYPE int
define INT8_TYPE signed char
define INT16_TYPE short int
define INT32_TYPE long int
define INT64_TYPE long long int
define UINT8_TYPE unsigned char
define UINT16_TYPE short unsigned int
define UINT32_TYPE long unsigned int
define UINT64_TYPE long long unsigned int
define INT_LEAST8_TYPE signed char
define INT_LEAST16_TYPE short int
define INT_LEAST32_TYPE long int
define INT_LEAST64_TYPE long long int
define UINT_LEAST8_TYPE unsigned char
define UINT_LEAST16_TYPE short unsigned int
define UINT_LEAST32_TYPE long unsigned int
define UINT_LEAST64_TYPE long long unsigned int
define INT_FAST8_TYPE int
define INT_FAST16_TYPE int
define INT_FAST32_TYPE long int
define INT_FAST64_TYPE long long int
define UINT_FAST8_TYPE unsigned int
define UINT_FAST16_TYPE unsigned int
define UINT_FAST32_TYPE long unsigned int
define UINT_FAST64_TYPE long long unsigned int
define INTPTR_TYPE int
define UINTPTR_TYPE unsigned int
define GXX_WEAK 0
define __DEPRECATED 1
define __GXX_ABI_VERSION 1002
define USING_SJLJ_EXCEPTIONS 1
define SCHAR_MAX 127
define SHRT_MAX 32767
define INT_MAX 32767
define LONG_MAX 2147483647L
define LONG_LONG_MAX 9223372036854775807LL
define WCHAR_MAX 32767
define WCHAR_MIN (-WCHAR_MAX - 1)
define WINT_MAX 65535U
define WINT_MIN 0U
define PTRDIFF_MAX 32767
define SIZE_MAX 65535U
define CHAR_BIT 8
define INTMAX_MAX 9223372036854775807LL
define __INTMAX_C(c) c ## LL
define UINTMAX_MAX 18446744073709551615ULL
define __UINTMAX_C(c) c ## ULL
define SIG_ATOMIC_MAX 32767
define SIG_ATOMIC_MIN (-SIG_ATOMIC_MAX - 1)
define INT8_MAX 127
define INT16_MAX 32767
define INT32_MAX 2147483647L
define INT64_MAX 9223372036854775807LL
define UINT8_MAX 255
define UINT16_MAX 65535U
define UINT32_MAX 4294967295UL
define UINT64_MAX 18446744073709551615ULL
define INT_LEAST8_MAX 127
define __INT8_C(c) c
define INT_LEAST16_MAX 32767
define __INT16_C(c) c
define INT_LEAST32_MAX 2147483647L
define __INT32_C(c) c ## L
define INT_LEAST64_MAX 9223372036854775807LL
define __INT64_C(c) c ## LL
define UINT_LEAST8_MAX 255
define __UINT8_C(c) c
define UINT_LEAST16_MAX 65535U
define __UINT16_C(c) c ## U
define UINT_LEAST32_MAX 4294967295UL
define __UINT32_C(c) c ## UL
define UINT_LEAST64_MAX 18446744073709551615ULL
define __UINT64_C(c) c ## ULL
define INT_FAST8_MAX 32767
define INT_FAST16_MAX 32767
define INT_FAST32_MAX 2147483647L
define INT_FAST64_MAX 9223372036854775807LL
define UINT_FAST8_MAX 65535U
define UINT_FAST16_MAX 65535U
define UINT_FAST32_MAX 4294967295UL
define UINT_FAST64_MAX 18446744073709551615ULL
define INTPTR_MAX 32767
define UINTPTR_MAX 65535U
define FLT_EVAL_METHOD 0
define DEC_EVAL_METHOD 2
define FLT_RADIX 2
define FLT_MANT_DIG 24
define FLT_DIG 6
define FLT_MIN_EXP (-125)
define FLT_MIN_10_EXP (-37)
define FLT_MAX_EXP 128
define FLT_MAX_10_EXP 38
define FLT_MAX 3.40282347e+38F
define FLT_MIN 1.17549435e-38F
define FLT_EPSILON 1.19209290e-7F
define FLT_DENORM_MIN 1.40129846e-45F
define FLT_HAS_DENORM 1
define FLT_HAS_INFINITY 1
define FLT_HAS_QUIET_NAN 1
define DBL_MANT_DIG 24
define DBL_DIG 6
define DBL_MIN_EXP (-125)
define DBL_MIN_10_EXP (-37)
define DBL_MAX_EXP 128
define DBL_MAX_10_EXP 38
define DBL_MAX ((double)3.40282347e+38L)
define DBL_MIN ((double)1.17549435e-38L)
define DBL_EPSILON ((double)1.19209290e-7L)
define DBL_DENORM_MIN ((double)1.40129846e-45L)
define DBL_HAS_DENORM 1
define DBL_HAS_INFINITY 1
define DBL_HAS_QUIET_NAN 1
define LDBL_MANT_DIG 24
define LDBL_DIG 6
define LDBL_MIN_EXP (-125)
define LDBL_MIN_10_EXP (-37)
define LDBL_MAX_EXP 128
define LDBL_MAX_10_EXP 38
define DECIMAL_DIG 9
define LDBL_MAX 3.40282347e+38L
define LDBL_MIN 1.17549435e-38L
define LDBL_EPSILON 1.19209290e-7L
define LDBL_DENORM_MIN 1.40129846e-45L
define LDBL_HAS_DENORM 1
define LDBL_HAS_INFINITY 1
define LDBL_HAS_QUIET_NAN 1
define DEC32_MANT_DIG 7
define DEC32_MIN_EXP (-94)
define DEC32_MAX_EXP 97
define DEC32_MIN 1E-95DF
define DEC32_MAX 9.999999E96DF
define DEC32_EPSILON 1E-6DF
define DEC32_SUBNORMAL_MIN 0.000001E-95DF
define DEC64_MANT_DIG 16
define DEC64_MIN_EXP (-382)
define DEC64_MAX_EXP 385
define DEC64_MIN 1E-383DD
define DEC64_MAX 9.999999999999999E384DD
define DEC64_EPSILON 1E-15DD
define DEC64_SUBNORMAL_MIN 0.000000000000001E-383DD
define DEC128_MANT_DIG 34
define DEC128_MIN_EXP (-6142)
define DEC128_MAX_EXP 6145
define DEC128_MIN 1E-6143DL
define DEC128_MAX 9.999999999999999999999999999999999E6144DL
define DEC128_EPSILON 1E-33DL
define DEC128_SUBNORMAL_MIN 0.000000000000000000000000000000001E-6143DL
define REGISTER_PREFIX
define USER_LABEL_PREFIX
define VERSION "4.5.3"
define GNUC_GNU_INLINE 1
define NO_INLINE 1
define FINITE_MATH_ONLY 0
define __PRAGMA_REDEFINE_EXTNAME 1
define SIZEOF_INT 2
define SIZEOF_LONG 4
define SIZEOF_LONG_LONG 8
define SIZEOF_SHORT 2
define SIZEOF_FLOAT 4
define SIZEOF_DOUBLE 4
define SIZEOF_LONG_DOUBLE 4
define SIZEOF_SIZE_T 2
define SIZEOF_WCHAR_T 2
define SIZEOF_WINT_T 2
define SIZEOF_PTRDIFF_T 2
define SIZEOF_POINTER 2
define __AVR 1
define AVR 1
define AVR 1
define AVR_ARCH 5
define AVR_ATmega328P 1
define AVR_HAVE_MOVW 1
define AVR_HAVE_LPMX 1
define AVR_ENHANCED 1
define AVR_HAVE_MUL 1
define AVR_MEGA 1
define AVR_HAVE_JMP_CALL 1
define AVR_2_BYTE_PC 1
define AVR_HAVE_16BIT_SP 1
define BIGGEST_ALIGNMENT 1
define F_CPU 16000000UL
Hi, I just found your library and tutorial. I am an experienced developer but haven't worked with Eclipse before so this error may be my own. However, after following the tutorial, deleting the project and starting from scratch a couple times (just in case it was something I missed). I have updated Arduino studio to the latest version and I still receive the following errors when I attempt to compile the ArduinoCore (Note - The code in the file actually looks fine to me, containing balanced parentheses, etc...):
Thanks in advance for you help with this issue
Problems Tab Output:
Description Resource Path Location Type
expected ‘)’ before ‘double’ ArduinoCore line 426, external location: /usr/lib/avr/include/math.h C/C++ Problem
expected unqualified-id before ‘double’ ArduinoCore line 426, external location: /usr/lib/avr/include/math.h C/C++ Problem
make: *** [HardwareSerial.o] Error 1 ArduinoCore C/C++ Problem
The eclipse console output is:
/usr/bin/avr-g++ -E -P -v -dD /home/randy/workspace/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp -mmcu=atmega328p -DF_CPU=16000000UL
define STDC 1
Using built-in specs.
define __cplusplus 1
COLLECT_GCC=/usr/bin/avr-g++
define STDC_HOSTED 1
COLLECT_LTO_WRAPPER=/usr/lib/gcc/avr/4.5.3/lto-wrapper
Target: avr
define GNUC 4
Configured with: ../src/configure -v --enable-languages=c,c++ --prefix=/usr/lib --infodir=/usr/share/info --mandir=/usr/share/man --bindir=/usr/bin --libexecdir=/usr/lib --libdir=/usr/lib --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-libssp --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=avr
define GNUC_MINOR 5
Thread model: single
define GNUC_PATCHLEVEL 3
gcc version 4.5.3 (GCC)
define GNUG 4
COLLECT_GCC_OPTIONS='-E' '-P' '-v' '-dD' '-mmcu=atmega328p' '-DF_CPU=16000000UL'
/usr/lib/gcc/avr/4.5.3/cc1plus -E -quiet -v -P -imultilib avr5 -DF_CPU=16000000UL /home/randy/workspace/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp -mmcu=atmega328p -fno-rtti -fno-enforce-eh-specs -fno-exceptions -dD
ignoring nonexistent directory "/usr/lib/gcc/avr/4.5.3/../../../avr/include/c++/4.5.3"
ignoring nonexistent directory "/usr/lib/gcc/avr/4.5.3/../../../avr/include/c++/4.5.3/avr/avr5"
ignoring nonexistent directory "/usr/lib/gcc/avr/4.5.3/../../../avr/include/c++/4.5.3/backward"
ignoring nonexistent directory "/usr/lib/gcc/avr/4.5.3/../../../avr/sys-include"
include "..." search starts here:
include <...> search starts here:
/usr/lib/gcc/avr/4.5.3/include
/usr/lib/gcc/avr/4.5.3/include-fixed
/usr/lib/gcc/avr/4.5.3/../../../avr/include
End of search list.
define SIZE_TYPE unsigned int
COMPILER_PATH=/usr/lib/gcc/avr/4.5.3/:/usr/lib/gcc/avr/4.5.3/:/usr/lib/gcc/avr/:/usr/lib/gcc/avr/4.5.3/:/usr/lib/gcc/avr/:/usr/lib/gcc/avr/4.5.3/../../../avr/bin/
define PTRDIFF_TYPE int
LIBRARY_PATH=/usr/lib/gcc/avr/4.5.3/avr5/:/usr/lib/gcc/avr/4.5.3/../../../avr/lib/avr5/:/usr/lib/gcc/avr/4.5.3/:/usr/lib/gcc/avr/4.5.3/../../../avr/lib/
define WCHAR_TYPE int
COLLECT_GCC_OPTIONS='-E' '-P' '-v' '-dD' '-mmcu=atmega328p' '-DF_CPU=16000000UL'
define WINT_TYPE unsigned int
define INTMAX_TYPE long long int
define UINTMAX_TYPE long long unsigned int
define CHAR16_TYPE short unsigned int
define CHAR32_TYPE long unsigned int
define SIG_ATOMIC_TYPE int
define INT8_TYPE signed char
define INT16_TYPE short int
define INT32_TYPE long int
define INT64_TYPE long long int
define UINT8_TYPE unsigned char
define UINT16_TYPE short unsigned int
define UINT32_TYPE long unsigned int
define UINT64_TYPE long long unsigned int
define INT_LEAST8_TYPE signed char
define INT_LEAST16_TYPE short int
define INT_LEAST32_TYPE long int
define INT_LEAST64_TYPE long long int
define UINT_LEAST8_TYPE unsigned char
define UINT_LEAST16_TYPE short unsigned int
define UINT_LEAST32_TYPE long unsigned int
define UINT_LEAST64_TYPE long long unsigned int
define INT_FAST8_TYPE int
define INT_FAST16_TYPE int
define INT_FAST32_TYPE long int
define INT_FAST64_TYPE long long int
define UINT_FAST8_TYPE unsigned int
define UINT_FAST16_TYPE unsigned int
define UINT_FAST32_TYPE long unsigned int
define UINT_FAST64_TYPE long long unsigned int
define INTPTR_TYPE int
define UINTPTR_TYPE unsigned int
define GXX_WEAK 0
define __DEPRECATED 1
define __GXX_ABI_VERSION 1002
define USING_SJLJ_EXCEPTIONS 1
define SCHAR_MAX 127
define SHRT_MAX 32767
define INT_MAX 32767
define LONG_MAX 2147483647L
define LONG_LONG_MAX 9223372036854775807LL
define WCHAR_MAX 32767
define WCHAR_MIN (-WCHAR_MAX - 1)
define WINT_MAX 65535U
define WINT_MIN 0U
define PTRDIFF_MAX 32767
define SIZE_MAX 65535U
define CHAR_BIT 8
define INTMAX_MAX 9223372036854775807LL
define __INTMAX_C(c) c ## LL
define UINTMAX_MAX 18446744073709551615ULL
define __UINTMAX_C(c) c ## ULL
define SIG_ATOMIC_MAX 32767
define SIG_ATOMIC_MIN (-SIG_ATOMIC_MAX - 1)
define INT8_MAX 127
define INT16_MAX 32767
define INT32_MAX 2147483647L
define INT64_MAX 9223372036854775807LL
define UINT8_MAX 255
define UINT16_MAX 65535U
define UINT32_MAX 4294967295UL
define UINT64_MAX 18446744073709551615ULL
define INT_LEAST8_MAX 127
define __INT8_C(c) c
define INT_LEAST16_MAX 32767
define __INT16_C(c) c
define INT_LEAST32_MAX 2147483647L
define __INT32_C(c) c ## L
define INT_LEAST64_MAX 9223372036854775807LL
define __INT64_C(c) c ## LL
define UINT_LEAST8_MAX 255
define __UINT8_C(c) c
define UINT_LEAST16_MAX 65535U
define __UINT16_C(c) c ## U
define UINT_LEAST32_MAX 4294967295UL
define __UINT32_C(c) c ## UL
define UINT_LEAST64_MAX 18446744073709551615ULL
define __UINT64_C(c) c ## ULL
define INT_FAST8_MAX 32767
define INT_FAST16_MAX 32767
define INT_FAST32_MAX 2147483647L
define INT_FAST64_MAX 9223372036854775807LL
define UINT_FAST8_MAX 65535U
define UINT_FAST16_MAX 65535U
define UINT_FAST32_MAX 4294967295UL
define UINT_FAST64_MAX 18446744073709551615ULL
define INTPTR_MAX 32767
define UINTPTR_MAX 65535U
define FLT_EVAL_METHOD 0
define DEC_EVAL_METHOD 2
define FLT_RADIX 2
define FLT_MANT_DIG 24
define FLT_DIG 6
define FLT_MIN_EXP (-125)
define FLT_MIN_10_EXP (-37)
define FLT_MAX_EXP 128
define FLT_MAX_10_EXP 38
define FLT_MAX 3.40282347e+38F
define FLT_MIN 1.17549435e-38F
define FLT_EPSILON 1.19209290e-7F
define FLT_DENORM_MIN 1.40129846e-45F
define FLT_HAS_DENORM 1
define FLT_HAS_INFINITY 1
define FLT_HAS_QUIET_NAN 1
define DBL_MANT_DIG 24
define DBL_DIG 6
define DBL_MIN_EXP (-125)
define DBL_MIN_10_EXP (-37)
define DBL_MAX_EXP 128
define DBL_MAX_10_EXP 38
define DBL_MAX ((double)3.40282347e+38L)
define DBL_MIN ((double)1.17549435e-38L)
define DBL_EPSILON ((double)1.19209290e-7L)
define DBL_DENORM_MIN ((double)1.40129846e-45L)
define DBL_HAS_DENORM 1
define DBL_HAS_INFINITY 1
define DBL_HAS_QUIET_NAN 1
define LDBL_MANT_DIG 24
define LDBL_DIG 6
define LDBL_MIN_EXP (-125)
define LDBL_MIN_10_EXP (-37)
define LDBL_MAX_EXP 128
define LDBL_MAX_10_EXP 38
define DECIMAL_DIG 9
define LDBL_MAX 3.40282347e+38L
define LDBL_MIN 1.17549435e-38L
define LDBL_EPSILON 1.19209290e-7L
define LDBL_DENORM_MIN 1.40129846e-45L
define LDBL_HAS_DENORM 1
define LDBL_HAS_INFINITY 1
define LDBL_HAS_QUIET_NAN 1
define DEC32_MANT_DIG 7
define DEC32_MIN_EXP (-94)
define DEC32_MAX_EXP 97
define DEC32_MIN 1E-95DF
define DEC32_MAX 9.999999E96DF
define DEC32_EPSILON 1E-6DF
define DEC32_SUBNORMAL_MIN 0.000001E-95DF
define DEC64_MANT_DIG 16
define DEC64_MIN_EXP (-382)
define DEC64_MAX_EXP 385
define DEC64_MIN 1E-383DD
define DEC64_MAX 9.999999999999999E384DD
define DEC64_EPSILON 1E-15DD
define DEC64_SUBNORMAL_MIN 0.000000000000001E-383DD
define DEC128_MANT_DIG 34
define DEC128_MIN_EXP (-6142)
define DEC128_MAX_EXP 6145
define DEC128_MIN 1E-6143DL
define DEC128_MAX 9.999999999999999999999999999999999E6144DL
define DEC128_EPSILON 1E-33DL
define DEC128_SUBNORMAL_MIN 0.000000000000000000000000000000001E-6143DL
define REGISTER_PREFIX
define USER_LABEL_PREFIX
define VERSION "4.5.3"
define GNUC_GNU_INLINE 1
define NO_INLINE 1
define FINITE_MATH_ONLY 0
define __PRAGMA_REDEFINE_EXTNAME 1
define SIZEOF_INT 2
define SIZEOF_LONG 4
define SIZEOF_LONG_LONG 8
define SIZEOF_SHORT 2
define SIZEOF_FLOAT 4
define SIZEOF_DOUBLE 4
define SIZEOF_LONG_DOUBLE 4
define SIZEOF_SIZE_T 2
define SIZEOF_WCHAR_T 2
define SIZEOF_WINT_T 2
define SIZEOF_PTRDIFF_T 2
define SIZEOF_POINTER 2
define __AVR 1
define AVR 1
define AVR 1
define AVR_ARCH 5
define AVR_ATmega328P 1
define AVR_HAVE_MOVW 1
define AVR_HAVE_LPMX 1
define AVR_ENHANCED 1
define AVR_HAVE_MUL 1
define AVR_MEGA 1
define AVR_HAVE_JMP_CALL 1
define AVR_2_BYTE_PC 1
define AVR_HAVE_16BIT_SP 1
define BIGGEST_ALIGNMENT 1
define F_CPU 16000000UL