Start a new topic

NexProgressBar j0 Arduino error

 Here is some of my code:

NexPage page0    = NexPage(0, 0, "page0");
NexPage page1    = NexPage(1, 0, "page1"); // comment this out if for long leg
//NexPage page1    = NexPage(2, 0, "page2"); // Comment this out if for short leg

NexButton b0 = NexButton(1, 1, "b0");//1,17,
NexProgressBar j0  = NexProgressBar(1, 2, "j0");
NexProgressBar j1  = NexProgressBar(1, 3, "j1");
char buffer[100] = {0};
NexTouch *nex_listen_list[] =
{
  &b0,
  NULL
};

 

I get this error in Arduino:

'NexProgressBar jo' redeclared as different kind of symbol


How do I fix this and why the error?


If I change the object name I do not get this error So I will just do that

Thanks



Coding is an exacting science with great artistic licence.

   what you presented does not have a jo

The output of the Arduino compile provides you with

   the exact line and how many characters in on that line

   that the offence has occurred.  Such clues need to be used.


But there is no way to tell from what you posted

 - the missing details make it impossible to know.


That's funny because I did just use that error that I gave and did realize my mistake! It was that another library or part of my code was using the "j0" that what this means "redeclared"


So all I had to do is change the progress bar's name to something else! and when I did all error's went away.


It was simple but I don't code very often and missed it.

Glad you worked it out.

But, for future when things are more complex, details are needed to solve.

A collision in naming convention where you alter one away on one line

   does not change all other occurrences of

What you presented didn't show the duplicating declaration

And there was nothing presented to which declaration is altered

 - not necessarily the correct declaration being altered.


The point is

    what little was posted would not be able to render an absolute answer.

Consider what details you have at hand, and what details you presented.

Login or Signup to post a comment