Compiling error exit code 1

hello everyone, I want to upload a sketch to my arduino but it won't compile it.

Arduino:1.8.15 (Windows 7), Board:"Arduino Uno"

G:\Moppy2-2.1.0\Moppy2-2.1.0\Microcontroller\Moppy2-Arduino\src\MoppyInstruments\EasyDrivers.cpp: In function 'instruments::EasyDrivers::resetAll()':

G:\Moppy2-2.1.0\Moppy2-2.1.0\Microcontroller\Moppy2-Arduino\src\MoppyInstruments\EasyDrivers.cpp:299:27: warning: iteration 2 invokes undefined behavior [-Waggressive-loop-optimizations]

 currentState[stepPin] = LOW;

G:\Moppy2-2.1.0\Moppy2-2.1.0\Microcontroller\Moppy2-Arduino\src\MoppyInstruments\EasyDrivers.cpp:297:29: note: within this loop

for (byte d=FIRST_DRIVER;d<=LAST_DRIVER;d++) {

                        ~^~~~~~~~~~~~~

G:\Moppy2-2.1.0\Moppy2-2.1.0\Microcontroller\Moppy2-Arduino\src\MoppyInstruments\ShiftedFloppyDrives.cpp: In member function 'virtual void instruments::ShiftedFloppyDrives::setup()':

G:\Moppy2-2.1.0\Moppy2-2.1.0\Microcontroller\Moppy2-Arduino\src\MoppyInstruments\ShiftedFloppyDrives.cpp:39:5: error: 'SPI' was not declared in this scope

 SPI.begin();

 ^~~

G:\Moppy2-2.1.0\Moppy2-2.1.0\Microcontroller\Moppy2-Arduino\src\MoppyInstruments\ShiftedFloppyDrives.cpp:39:5: note: suggested alternative: 'SPIE'

 SPI.begin();

 ^~~

 SPIE

G:\Moppy2-2.1.0\Moppy2-2.1.0\Microcontroller\Moppy2-Arduino\src\MoppyInstruments\ShiftedFloppyDrives.cpp:40:58: error: 'SPI_MODE0' was not declared in this scope

 SPI.beginTransaction(SPISettings(16000000, LSBFIRST, SPI_MODE0)); // We're never ending this, hopefully that's okay...

                                                      ^~~~~~~~~

G:\Moppy2-2.1.0\Moppy2-2.1.0\Microcontroller\Moppy2-Arduino\src\MoppyInstruments\ShiftedFloppyDrives.cpp:40:26: error: 'SPISettings' was not declared in this scope

 SPI.beginTransaction(SPISettings(16000000, LSBFIRST, SPI_MODE0)); // We're never ending this, hopefully that's okay...

                      ^~~~~~~~~~~

G:\Moppy2-2.1.0\Moppy2-2.1.0\Microcontroller\Moppy2-Arduino\src\MoppyInstruments\ShiftedFloppyDrives.cpp: In static member function 'static void instruments::ShiftedFloppyDrives::shiftBits()':

G:\Moppy2-2.1.0\Moppy2-2.1.0\Microcontroller\Moppy2-Arduino\src\MoppyInstruments\ShiftedFloppyDrives.cpp:206:5: error: 'SPI' was not declared in this scope

 SPI.transfer(directionBits);

 ^~~

G:\Moppy2-2.1.0\Moppy2-2.1.0\Microcontroller\Moppy2-Arduino\src\MoppyInstruments\ShiftedFloppyDrives.cpp:206:5: note: suggested alternative: 'SPIE'

 SPI.transfer(directionBits);

 ^~~

 SPIE

exit status 1

Fout bij het compileren voor board Arduino Uno

Dit rapport zou meer informatie bevatten met
"Uitgebreide uitvoer weergeven tijden compilatie"
optie aan in Bestand -> Voorkeuren.

and here is my sketch:

//
/
__ __ /
/
| / | /
/
| \ / | ___ _ __ _ __ _ _ /
/
| |/| |/ _ | '_ | '_ | | | | /
/
| | | | () | |) | |) | || | /
/
|| ||_/| ./| ./ _, | /
/
| | | | __/ | /
/
|
| || |
/ /
/
/
/
/

/* This file left intentionally blank to appease the Arduino IDE.
*

  • FOR GENERAL CONFIGURATION OPTIONS SEE MoppyConfig.h
  • See src/main.cpp for the top level code. Functional
  • code files can be found in the src folder in the sketch directory, but
  • these should be opened using a text editor or different IDE as
  • the Arduino IDE does weird things if you start trying to use
  • sub-directories.
    */
    #include <Arduino.h>
    #include "MoppyConfig.h"
    #include "MoppyInstrument.h"

/**********

  • MoppyInstruments handle the sound-creation logic for your setup. The
  • instrument class provides a systemMessage handler function and a deviceMessage
  • handler function for handling messages received by the network and a tick
  • function for precise timing events.
  • Configure the appropriate instrument class for your setup in MoppyConfig.h
    */

// Floppy drives directly connected to the Arduino's digital pins
#ifdef INSTRUMENT_FLOPPIES
#include "FloppyDrives.h"
MoppyInstrument *instrument = new instruments::FloppyDrives();
#endif

// EasyDriver stepper motor driver
#ifdef INSTRUMENT_EASYDRIVER
#include "EasyDrivers.h"
MoppyInstrument *instrument = new instruments::EasyDrivers();
#endif

// L298N stepper motor driver
#ifdef INSTRUMENT_L298N
#include "L298N.h"
MoppyInstrument *instrument = new instruments::L298N();
#endif

// A single device (e.g. xylophone, drums, etc.) connected to shift registers
#ifdef INSTRUMENT_SHIFT_REGISTER
#include "ShiftRegister.h"
MoppyInstrument *instrument = new instruments::ShiftRegister();
#endif

// Floppy drives connected to 74HC595 shift registers
#ifdef INSTRUMENT_SHIFTED_FLOPPIES
#include "ShiftedFloppyDrives.h"
MoppyInstrument *instrument = new instruments::ShiftedFloppyDrives();
#endif

/**********

  • MoppyNetwork classes receive messages sent by the Controller application,
  • parse them, and use the data to call the appropriate handler as implemented
  • in the instrument class defined above.
  • Configure the appropriate networking class for your setup in MoppyConfig.h
    */

// Standard Arduino HardwareSerial implementation
#ifdef NETWORK_SERIAL
#include "MoppySerial.h"
MoppySerial network = MoppySerial(instrument);
#endif

//// UDP Implementation using some sort of network stack? (Not implemented yet)
#ifdef NETWORK_UDP
#include "MoppyUDP.h"
MoppyUDP network = MoppyUDP(instrument);
#endif

//The setup function is called once at startup of the sketch
void setup()
{
// Call setup() on the instrument to allow to to prepare for action
instrument->setup();

// Tell the network to start receiving messages
network.begin();

}

// The loop function is called in an endless loop
void loop()
{
// Endlessly read messages on the network. The network implementation
// will call the system or device handlers on the intrument whenever a message is received.
network.readMessages();
}

can someone help me out please?

Usually this means you're accessing out of array bounds.

 error: 'SPI' was not declared in this scope

You need the SPI library.

Please remember to use code tags when posting code.

And error text.