I have no idea.. need help please?

So… this is my code. I am going into this very blind. And I try to put it on the board. And I keep getting an error. Help is welcomed

/*MAX147 Test Routine for Arduino Mega
  include SPI library
  start serial
  initialize SPI
  writeln "MAX147 test"
  writeln "enter output port "
  read port
  writeln "enter ADC number "
  read number
  access MAX147
  write "ADC value is "; write ADCValue; should fit in an integer
  keep doing it over and over
*/

/* this routine reads the MAX147 ADC ports – there are four MAX147’s whose chip select is as follows:
  A0  0 - (ADC0)PF0 X   MAX1470
  A1  1 -(ADC1)PF1  X   MAX1471
  A2  2 - (ADC2)PF2 X   MAX1472
  A3  3 - (ADC3)PF3 X   MAX1473
  MAX147 data sheet is https://datasheets.maximintegrated.com/en/ds/MAX146-MAX147.pdf
  programming instructions are on page 12
  EXPANDED ADC USING PORT F0 A0 DRIVING MAX147
  MAX1470-0 x   120vac sine wave
  MAX1470-1 X   120vac current
  MAX1470-2 x   240vac sine wave
  MAX1470-3 X   240vac current
  MAX1470-4 X   Backup generator battery voltage sensing
  MAX1470-5 X   Generator fuel level sensor
  MAX1470-6 x   Backup generator 240vac sine wave sensing
  MAX1470-7 x   Backup generator 120vac sine wave sensing
  EXPANDED ADC USING PORT F1 A1 DRIVING MAX147
  MAX1471-0
  MAX1471-1 x   24vac sine wave
  MAX1471-2 X   24vac current
  MAX1471-3 X   main battery voltage
  MAX1471-4 X   main battery current
  MAX1471-5 X   solar panel voltage
  MAX1471-6 X   solar panel current
  MAX1471-7 X   water pressure 1
  EXPANDED ADC USING PORT F2 A2 DRIVING MAX147
  MAX1472-0 X   water tank depth
  MAX1472-1 X   second water pressure
  MAX1472-2 X   water flow paddle
  MAX1472-3 X   Surface system water flow sensing
  MAX1472-4
  MAX1472-5
  MAX1472-6
  MAX1472-7
  EXPANDED ADC USING PORT F3 A3 DRIVING MAX147
  MAX1473-0
  MAX1473-1
  MAX1473-2  X    DAC
  MAX1473-3     X   photo cell 5
  MAX1473-4 X    X    selected load cell 1 - photo cell 1
  MAX1473-5 X    X    selected load cell 2 - photo cell 2
  MAX1473-6 X    X    selected load cell 3 - photo cell 3
  MAX1473-7 X    X    selected load cell 4 - photo cell 4
*/
#include <SPI.h> // necessary library
// global variables
int cs; // using digital pin for SPI chip select
byte ADC0;
byte ADC1;
byte ADC2; // MAX147 sends value in two bytes
byte ADC_sel; // 0b10001111 we put the ADC selected into the zeroes
byte ADCw;  // sent to MAX147 to select ADC port


void setup()
{
  pinMode(0, OUTPUT);  digitalWrite(0, HIGH);   // set all MAX147 chip selects as outputs and HIGH
  pinMode(1, OUTPUT);   digitalWrite(1, HIGH);
  pinMode(2, OUTPUT);   digitalWrite(2, HIGH);
  pinMode(3, OUTPUT);   digitalWrite(3, HIGH);
  SPI.begin(); // wake up the SPI bus.
  SPI.setBitOrder(MSBFIRST);
  Serial.begin(9600);
}

void Loop()
{
  Serial.println("--- Start MAX147 ADC Reading Test---");
  Getport();
  GetMADC();
  readMADC();

} // end loop

void Getport()
{
  Serial.print("Enter Chip 0 thru 3 ");  cs = 4;
  while (cs > 3) // loop here waiting for a valid chip
  {
    while (Serial.available() > 0)
    {
      cs = Serial.read();
    }
  } // end while cd>3
  Serial.println(cs);
} // end of Getport

void GetMADC()
{
  byte got;

  Serial.print("Enter ADC 0 thru 7 ");  got = '8';
  while (got > '7') // loop here waiting for a valid ADC
  {
    if (Serial.available() > 0)
    {
      got = Serial.read();
    }
  }
  Serial.println(got); Serial.println();
  ADCw = got;
} // end of Getport




void  readMADC()
{
  switch (ADCw)
  {
    case '0': {
        ADC_sel = 0b10001111;
        break;
      }
    case '1': {
        ADC_sel = 0b10011111;
        break;
      }
    case '2': {
        ADC_sel = 0b10101111;
        break;
      }
    case '3': {
        ADC_sel = 0b10111111;
        break;
      }
    case '4': {
        ADC_sel = 0b11001111;
        break;
      }
    case '5': {
        ADC_sel = 0b11011111;
        break;
      }
    case '6': {
        ADC_sel = 0b11101111;
        break;
      }
    case '7': {
        ADC_sel = 0b11111111; //break;}
      }  // end case
      //now read the MAX147
      digitalWrite(cs, LOW);
      ADC0 = SPI.transfer(ADC_sel);
      //ADC0 = SPI.transfer(0x00);
      //  SPI.transfer(0b00000000);
      ADC1 = SPI.transfer(0x00);
      ADC2 = SPI.transfer(0x00);
      digitalWrite(cs, HIGH);
      Serial.print("ADC0 "); Serial.print(ADC0);
      Serial.print("   ADC1 "); Serial.print(ADC1);
      Serial.print("   ADC2 "); Serial.println(ADC2);
      Serial.println();
  }
} // end readADC

So… this is the error. Advice and help is welcomed. Thank you in advance ^.^

Arduino: 1.8.5 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

C:\Users\SIMULA~1\AppData\Local\Temp\ccqozC9c.ltrans0.ltrans.o: In function `main':

ccqozC9c.ltrans0.o:(.text.startup+0x1c6): undefined reference to `loop'

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board Arduino/Genuino Mega or Mega 2560.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Case does matter.

void Loop()undefined reference to `loop'

In your program

void Loop()

This is not the start of the loop() function. Check the name carefully

Whandall:
Case does matter.

void Loop()undefined reference to `loop'

UKHeliBob:
In your program

void Loop()

This is not the start of the loop() function. Check the name carefully

You guys rock! Thank you. It uploaded without a problem when I changed Loop to loop.

The issue remains as Whandall pointed out. The error comes from main() not your code.

In function `main':

main() is looking for setup() and loop() instead it gets setup() and Loop(), and if Loop() is not the start of the loop() function, then you're missing the loop() function which would generate an undefined reference to `loop' error.