codeblocks with arduino

Hello.

My OS: Linux Peppermint 5

I set up Codeblocks with Arduino and on the first glance it works like a charme.

But as soon as leave the Simulator-Debug option and try to use my board Atmega328p 16Mhz I get the following errors when I compile the code: It seems that some Header files are missing.

-------------- Build: Arduino Uno in test (compiler: GNU AVR GCC Compiler)--------------- . . . . .

/home/drumanart/.codeblocks/arduino/hardware/arduino/cores/arduino/Platform.h:6:0, from /home/drumanart/.codeblocks/arduino/hardware/arduino/cores/arduino/CDC.cpp:19, from cores/CDC.cpp:3: /usr/lib/avr/include/avr/pgmspace.h:1067:26: error: ‘uint_farptr_t’ was not declared in this scope extern size_t strlen_PF (uint_farptr_t src) ATTR_CONST; /* program memory can't change / ^ /usr/lib/avr/include/avr/pgmspace.h:1068:27: error: ‘uint_farptr_t’ was not declared in this scope extern size_t strnlen_PF (uint_farptr_t src, size_t len) ATTR_CONST; / program memory can't change / ^ /usr/lib/avr/include/avr/pgmspace.h:1068:53: error: expected primary-expression before ‘len’ extern size_t strnlen_PF (uint_farptr_t src, size_t len) ATTR_CONST; / program memory can't change / ^ /usr/lib/avr/include/avr/pgmspace.h:1068:58: error: expression list treated as compound expression in initializer [-fpermissive] extern size_t strnlen_PF (uint_farptr_t src, size_t len) ATTR_CONST; / program memory can't change */ ^ /usr/lib/avr/include/avr/pgmspace.h:1069:37: error: ‘uint_farptr_t’ has not been declared extern void *memcpy_PF (void *dest, uint_farptr_t src, size_t len); ^ /usr/lib/avr/include/avr/pgmspace.h:1070:37: error: ‘uint_farptr_t’ has not been declared extern char *strcpy_PF (char *dest, uint_farptr_t src); ^ /usr/lib/avr/include/avr/pgmspace.h:1071:38: error: ‘uint_farptr_t’ has not been declared extern char *strncpy_PF (char *dest, uint_farptr_t src, size_t len); ^ /usr/lib/avr/include/avr/pgmspace.h:1072:37: error: ‘uint_farptr_t’ has not been declared extern char *strcat_PF (char *dest, uint_farptr_t src); ^ /usr/lib/avr/include/avr/pgmspace.h:1073:38: error: ‘uint_farptr_t’ has not been declared extern size_t strlcat_PF (char *dst, uint_farptr_t src, size_t siz); ^ /usr/lib/avr/include/avr/pgmspace.h:1074:38: error: ‘uint_farptr_t’ has not been declared extern char *strncat_PF (char *dest, uint_farptr_t src, size_t len); ^ /usr/lib/avr/include/avr/pgmspace.h:1075:39: error: ‘uint_farptr_t’ has not been declared extern int strcmp_PF (const char *s1, uint_farptr_t s2) ATTR_PURE; ^ /usr/lib/avr/include/avr/pgmspace.h:1076:40: error: ‘uint_farptr_t’ has not been declared extern int strncmp_PF (const char *s1, uint_farptr_t s2, size_t n) ATTR_PURE; ^ /usr/lib/avr/include/avr/pgmspace.h:1077:43: error: ‘uint_farptr_t’ has not been declared extern int strcasecmp_PF (const char *s1, uint_farptr_t s2) ATTR_PURE; ^ /usr/lib/avr/include/avr/pgmspace.h:1078:44: error: ‘uint_farptr_t’ has not been declared extern int strncasecmp_PF (const char *s1, uint_farptr_t s2, size_t n) ATTR_PURE; ^ /usr/lib/avr/include/avr/pgmspace.h:1079:41: error: ‘uint_farptr_t’ has not been declared extern char *strstr_PF (const char *s1, uint_farptr_t s2); ^ /usr/lib/avr/include/avr/pgmspace.h:1080:38: error: ‘uint_farptr_t’ has not been declared extern size_t strlcpy_PF (char *dst, uint_farptr_t src, size_t siz); ^ /usr/lib/avr/include/avr/pgmspace.h:1081:36: error: ‘uint_farptr_t’ has not been declared extern int memcmp_PF(const void *, uint_farptr_t, size_t) ATTR_PURE; ^ Process terminated with status 1 (0 minute(s), 0 second(s))

In file included from /home/drumanart/.codeblocks/arduino/hardware/arduino/cores/arduino/Arduino.h:8:0, from /home/drumanart/.codeblocks/arduino/hardware/arduino/cores/arduino/HardwareSerial.cpp:27, from cores/HardwareSerial.cpp:3: /usr/lib/avr/include/avr/pgmspace.h:1067:26: error: ‘uint_farptr_t’ was not declared in this scope extern size_t strlen_PF (uint_farptr_t src) ATTR_CONST; /* program memory can't change / ^ /usr/lib/avr/include/avr/pgmspace.h:1068:27: error: ‘uint_farptr_t’ was not declared in this scope extern size_t strnlen_PF (uint_farptr_t src, size_t len) ATTR_CONST; / program memory can't change / ^ /usr/lib/avr/include/avr/pgmspace.h:1068:53: error: expected primary-expression before ‘len’ extern size_t strnlen_PF (uint_farptr_t src, size_t len) ATTR_CONST; / program memory can't change / ^ /usr/lib/avr/include/avr/pgmspace.h:1068:58: error: expression list treated as compound expression in initializer [-fpermissive] extern size_t strnlen_PF (uint_farptr_t src, size_t len) ATTR_CONST; / program memory can't change */ ^ /usr/lib/avr/include/avr/pgmspace.h:1069:37: error: ‘uint_farptr_t’ has not been declared extern void *memcpy_PF (void *dest, uint_farptr_t src, size_t len); ^ /usr/lib/avr/include/avr/pgmspace.h:1070:37: error: ‘uint_farptr_t’ has not been declared extern char *strcpy_PF (char *dest, uint_farptr_t src); ^ /usr/lib/avr/include/avr/pgmspace.h:1071:38: error: ‘uint_farptr_t’ has not been declared extern char *strncpy_PF (char *dest, uint_farptr_t src, size_t len); ^ /usr/lib/avr/include/avr/pgmspace.h:1072:37: error: ‘uint_farptr_t’ has not been declared extern char *strcat_PF (char *dest, uint_farptr_t src); ^ /usr/lib/avr/include/avr/pgmspace.h:1073:38: error: ‘uint_farptr_t’ has not been declared extern size_t strlcat_PF (char *dst, uint_farptr_t src, size_t siz); ^ /usr/lib/avr/include/avr/pgmspace.h:1074:38: error: ‘uint_farptr_t’ has not been declared extern char *strncat_PF (char *dest, uint_farptr_t src, size_t len); ^ /usr/lib/avr/include/avr/pgmspace.h:1075:39: error: ‘uint_farptr_t’ has not been declared extern int strcmp_PF (const char *s1, uint_farptr_t s2) ATTR_PURE; ^ /usr/lib/avr/include/avr/pgmspace.h:1076:40: error: ‘uint_farptr_t’ has not been declared extern int strncmp_PF (const char *s1, uint_farptr_t s2, size_t n) ATTR_PURE; ^ /usr/lib/avr/include/avr/pgmspace.h:1077:43: error: ‘uint_farptr_t’ has not been declared extern int strcasecmp_PF (const char *s1, uint_farptr_t s2) ATTR_PURE; ^ /usr/lib/avr/include/avr/pgmspace.h:1078:44: error: ‘uint_farptr_t’ has not been declared extern int strncasecmp_PF (const char *s1, uint_farptr_t s2, size_t n) ATTR_PURE; ^ /usr/lib/avr/include/avr/pgmspace.h:1079:41: error: ‘uint_farptr_t’ has not been declared extern char *strstr_PF (const char *s1, uint_farptr_t s2); ^ /usr/lib/avr/include/avr/pgmspace.h:1080:38: error: ‘uint_farptr_t’ has not been declared extern size_t strlcpy_PF (char *dst, uint_farptr_t src, size_t siz); ^ /usr/lib/avr/include/avr/pgmspace.h:1081:36: error: ‘uint_farptr_t’ has not been declared extern int memcmp_PF(const void *, uint_farptr_t, size_t) ATTR_PURE; ^ Process terminated with status 1 (0 minute(s), 0 second(s)) 34 error(s), 0 warning(s) (0 minute(s), 0 second(s)) Build log saved as: file:///home/drumanart/sketchbook/test/test_build_log.html

Thanks Martin