ERROR: char-array initialized from wide string

Dear Forum,

Has anybody ever seen this compilation error?

My code compiled about 2 weeks ago on an earlier version of Arduino IDE. I have not touched my code since then.

I recently downloaded and installed 1.8.11, compiled, and got this error. So I uninstalled 1.8.11 and then installed 1.8.10.

I still get the error.

struct gpsDMS{  //these variables are used for all calculations, ESPECIALLY latRadians
  float latDegrees;                     // latitude degrees calculated from GPS receiver or entered by user
  float latRadians;                     // latitude radians calculated from latitude degrees
  float lonDegrees;                     // longitude degrees calculated from GPS receiver or entered by user
  float lonRadians;                     // longitude radians calculated from longitude degrees
  float latSign;                        // these are +1 or -1 used for changing the sign of the float
  float lonSign;                        // these are +1 or -1 used for changing the sign of the float
  byte  latsgn;                         // these are the "+" and "-" symbols concatenated with the string
  byte  lonsgn;                         // these are the "+" and "-" symbols concatenated with the string
  byte  latCoords[20] = "";             //must be initalized as empty string so that strcat can be used
  byte  lonCoords[20] = "";             //https://www.codingame.com/playgrounds/14213/how-to-play-with-strings-in-c/string-concatenation 
  char  latTemp[20] = "";
  char  lonTemp[20] = "";
} gpsHOME, gpsTARGET, gpsCURRENT, gpsPREV, gpsTEMP;

The error on the compilation highlights the first line struct gpsDMS{

But this is not a character array. This is a struct. How is the compiler getting mixed up between a character array and a struct?

Any ideas?

TIA,
--Neal

Replace ''byte" with "char":

struct gpsDMS{  //these variables are used for all calculations, ESPECIALLY latRadians
  float latDegrees;                     // latitude degrees calculated from GPS receiver or entered by user
  float latRadians;                     // latitude radians calculated from latitude degrees
  float lonDegrees;                     // longitude degrees calculated from GPS receiver or entered by user
  float lonRadians;                     // longitude radians calculated from longitude degrees
  float latSign;                        // these are +1 or -1 used for changing the sign of the float
  float lonSign;                        // these are +1 or -1 used for changing the sign of the float
  byte  latsgn;                         // these are the "+" and "-" symbols concatenated with the string
  byte  lonsgn;                         // these are the "+" and "-" symbols concatenated with the string
  char  latCoords[20] = "";             //must be initalized as empty string so that strcat can be used
  char  lonCoords[20] = "";             //https://www.codingame.com/playgrounds/14213/how-to-play-with-strings-in-c/string-concatenation
  char  latTemp[20] = "";
  char  lonTemp[20] = "";
} gpsHOME, gpsTARGET, gpsCURRENT, gpsPREV, gpsTEMP;


void setup() {
}

void loop() {
}

Dear Forum,

I think that I may have solved this problem.

The original error was:

exit status 1
char-array initialized from wide string

I found this link on the Arduino Forum when I searched for "exit status 1": exit status 1 - Error compiling for board Arduino/Genuino Mega or Mega 2560 - Programming Questions - Arduino Forum

I changed the Arduino AVR Board version to 1.6.21 and this seems to have solved that problem. Thank you Pert.

Now my code gets past the "wide string" error...I just have a couple of other errors that I have to overcome regarding genieArduino.