Getting --exit status 1 Error compiling for board Arduino/Genuino Uno.

I am getting an the error message during the compiling / uploading the shiftOutX_10 and alsoshiftOutX program :

"exit status 1
Error compiling for board Arduino/Genuino Uno."

Kindly help to solve the problem

OK
https://forum.arduino.cc/index.php?topic=97455.0

.

Post the entire error message. There is more information in the message that points to the type and location of the error.

Hi groundfungus ,

I am getting only the following msg when I run the shiftOutX :

"exit status 1
Error compiling for board Arduino/Genuino Uno."

&&& Nothing more ...

The setup works very well with the normal shiftRegister library program

Please post your code and links to any libraries that are not included with the IDE (shiftOutX). Read the "how to use the forum" stickies to see how to format and post code. Also which version of the IDE are you using? If we have the code and libraries we can put the code into our IDE and try to duplicate the error and figure out what the trouble is.

edit: Is the shiftOutX library the one in the Playground? If so, which version (1.0 or 1.1.0)?

Hi, groundfungus

my comments to ur mail:

  1. Version is 1.6.11

  2. the code is :

#include <ShiftOutX.h>
#include <ShiftPinNo.h>
shiftOutX myRegs(9,10,8,MSBFIRST,1);
void setup() {

}

void loop() {
myRegs.allOff();
}

  1. I notice : whereas the ShitOutX.h in the #include statement has a red font .. the font of ShiftPinNo in its #include statement remains the normal black font
  1. I notice : whereas the ShitOutX.h in the #include statement has a red font .. the font of ShiftPinNo in its #include statement remains the normal black font

Colors are assigned at random, and have no meaning.

You have NOT provided links for the libraries you are using, so no one can reproduce your error.

If you are using the ShiftOutX library Ver 1.1.0 from the playground, (you didn't say) the trouble seems to be a duplicate variable definition in ShiftOutX.h header file. uint8_t *_register_array is declared twice, once in the private: section and again in the protected section. I commented out the declaration in the private section and code compiles (see below). I am not positive that that is the right one to comment out, but I don't have time to dig through the code. I am not sure that I would trust a library that contains such a fundamental error. What are you trying to do? Maybe someone can suggest a better library or method.

private:
 bool _software_spi;
 uint8_t _latchPin;
 uint8_t _dataPin;
 uint8_t _clockPin;
 uint8_t _bitOrder;
 uint8_t _NofRegisters;
 uint8_t _clockDivider;
 uint8_t _dataMode;
 //uint8_t *_register_array; // ** commented out   // to point to the array of bytes or uint8_t type
 //function to setup shiftOut like setting pins to output, and populate members of the class as well. 
 void init(uint8_t latchPin, uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, uint8_t NofRegisters);
 //function to setup shiftOutX with SPI
 void initSPI(uint8_t ssPin, uint8_t NofRegisters, uint8_t bitOrder, uint8_t clockDivider);
        
        protected:
 uint8_t *_register_array; //to point to the array of bytes or uint8_t type
 //function to send out bits
 void sendOut(void);

If you go to File, Preferences in the IDE you will see a selection for show verbose output. Enable verbose output while compiling will show more info about errors. And if "all warnings" turned on will also.

Please read the "how to use the forum" stickies to see how to format and post code and errors. You should answer ALL the questions asked. If I guessed wrong on the library then I wasted a bunch of time.

Thanks Groundfungus,
The problem is solved by commenting out : uint8_t *_register_array in the private section of the code.. The code is now compiling and the setup is working.
So, sir you have not wasted a bunch your time

Thanks a lot....

However one small issue :

why is the shiftOutX_10 not working within a for( ) loop...

Regards

why is the shiftOutX_10 not working within a for( ) loop...

I would have to see the code and a definition of "not working". Is there an error, is it not doing what you expect? What do you expect?

hi;

The code is given below:

#include <ShiftOutX.h>
#include <ShiftPinNo.h>
shiftOutX myRegs(9,10,8,MSBFIRST,1); // 9 = Latch, 10 = data, 8 = clock
void setup() {

}

void loop() {
for(int j = 0; j< 7; j++);{
myRegs.pinOn(shPinj);
delay(1000);
}
}

Error message is :

exit status 1
'shPinj' was not declared in this scope

You have not defined shPinj.
See example:
http://playground.arduino.cc/Main/ShiftOutX

.

Was shPinj supposed to be accessing an array?
myRegs.pinOn(shPin[j]);

and declare with the other variables:
byte shPin[] = {2,3,4,5,6,7,8,9,}; // or whatever values you are using

Hi LarryD,

I am unable to understand how to put :

"#define shPinj value "

in the code ..

As 'j' is not a constant we cannot give any value to it, like the way it is used in the example stated by you... Please explain a bit more .. if possible

As 'j' is not a constant we cannot give any value to it, like the way it is used in the example stated by you...

Who is "we"?
Is this for school?

You need to tell us more what you trying to accomplish with your sketch and hardware.

Are you saying you cannot use:
unsigned int shPin[] ={1,2,4,8,16,32,64}; //7 elements in array, maybe you wanted 8 therefore add 128 and j<=7

for(int j = 0; j< 7; j++)
{
  myRegs.pinOn(shPin[j]);
  delay(1000);
}

Yeah LarryD,

We = you + Me;

Sooory for the joke....

What's the purpose of the program???
Answer : A walk through of 1's across 7 leds placed at pins from Q0 to Q6 of 74595 using the shiftOutX library.. and Nothing more

Your Suggestion ...
Already tried but is not working...
As you say, I will try again..

Hi LarryD,

Your suggestion has worked ... the setup is working.. However it works for shiftOutX library after tweaking your sketch as follows;

int shPin[] ={1,2,3,4,5,6,7,8}; // declaring an array for shPin

for(int j = 0; j< 8; j++)
{
myRegs.pinOn(shPin[j]);
delay(1000);
myRegs.pinOf(shPin[j]); // to get blinking
delay(1000);
}

i am unable to upload TTN-mapper coding into TTGO Tbeam due to this error :

Using library SPI at version 1.0 in folder: C:\Users\dvfd\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0\libraries\SPI
exit status 1
Error compiling for board Heltec_WIFI_LoRa_32.

please some one help

The "Using library..." statement is NOT an error.

The code you didn't post, using libraries that you did not provide links to, surely causes more output than that, or would if you enabled verbose more during compilation.