You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The foliowing (condensed for reproduction) code compiles fine on all Arduinos (UNO/pro/Nano...) avr 1.8.2 and the ESP32 core 1.04. It fails to compile on the esp8266 core. It seems to be a compiler related tool chain problem.
Setup: Basic *.ino file with include to the header file and the following header with a simple class definition arraytest.h
#ifndef ARRAYTEST_H_
#define ARRAYTEST_H_
/******************************************************************************************************/
#define MAX_A_FUNCTIONS 29
/******************************************************************************************************/
/** @brief Data associated to each entry in the A roster.*/
class A_Manager {
private:
uint8_t _aKey ; /**< The numeric place (0-10 = slot number) of the part on the roster (=unique ID) */
const char* _typeField; /** part - Added for more flexibility */
const char* _subTypeField; /** Added for more flexibility for part - active for the selected part */
char _functionMap[MAX_A_FUNCTIONS + 1] = ""; /** < Current status of the functions: 0 for Off, 1 for On - Length of array is MAX_A_FUNCTIONS */
public:
char functionMap[MAX_A_FUNCTIONS + 1] = "";
A_Manager(uint8_t , const char* , const char*, char []);
~A_Manager();
uint8_t getAKey() const ;
};
/***************************************** CPP part *************************************************/
In file included from C:\Dev\Arduino\ESP8266_Dev\_Examples\error_array_class\error_array.ino:1:0:
c:\XXXX\arduino_build_XXXX\sketch\arraytest.h: In constructor 'A_Manager::A_Manager(uint8_t, const char*, const char*, char*)':
arraytest.h:22:151: error: array used as initializer
A_Manager::A_Manager(uint8_t aKey, const char* typeField = "APart", const char* subTypeField = "ASubPart", char functionMap[MAX_A_FUNCTIONS+1] = {'\0'})
arraytest.h:22:151: error: array used as initializer
exit status 1
array used as initializer
Seems like a similar error the gnu compilers had until 5.03
c++11 is activated in platform.txt
There is no option to change the program as it works in production on all other named platforms for a year.
If you need more Info -glad to help
The text was updated successfully, but these errors were encountered:
Basic Infos
Platform
Settings in IDE
Below does not matter its a toolchain problem
Problem Description
The foliowing (condensed for reproduction) code compiles fine on all Arduinos (UNO/pro/Nano...) avr 1.8.2 and the ESP32 core 1.04. It fails to compile on the esp8266 core. It seems to be a compiler related tool chain problem.
Setup: Basic *.ino file with include to the header file and the following header with a simple class definition arraytest.h
/***************************************** CPP part *************************************************/
Debug Messages
Seems like a similar error the gnu compilers had until 5.03
c++11 is activated in platform.txt
There is no option to change the program as it works in production on all other named platforms for a year.
If you need more Info -glad to help
The text was updated successfully, but these errors were encountered: