Weird Error Message

Can anyone explain why I am getting this error message?

/var/folders/_9/46xk4w457f9c2jhxgl826qgh0000gn/T//cclqEcnf.ltrans2.ltrans.o: In function loop': /Users/MaxMaeder/Documents/Arduino/USB_HACKER/USB_HACKER.ino:76: undefined reference to readPacket(Adafruit_BLE*, unsigned int)'
/Users/MaxMaeder/Documents/Arduino/USB_HACKER/USB_HACKER.ino:79: undefined reference to packetbuffer' /Users/MaxMaeder/Documents/Arduino/USB_HACKER/USB_HACKER.ino:80: undefined reference to packetbuffer'
/Users/MaxMaeder/Documents/Arduino/USB_HACKER/USB_HACKER.ino:82: undefined reference to `packetbuffer'
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board Adafruit Feather 32u4.

#include <SPI.h> // Include Librarys
#include <Keyboard.h>
#include "Adafruit_BLE.h"
#include "Adafruit_BluefruitLE_SPI.h"
#include "Adafruit_BluefruitLE_UART.h"

#define BLUEFRUIT_SPI_CS               8 // Declare Pins
#define BLUEFRUIT_SPI_IRQ              7
#define BLUEFRUIT_SPI_RST              4 

#define FACTORYRESET_ENABLE         1 // Declare Bluefruit Settings
#define MINIMUM_FIRMWARE_VERSION    "0.6.6"
#define MODE_LED_BEHAVIOUR          "MODE"
#define BUFSIZE                     128
#define VERBOSE_MODE                true
#define BLE_READPACKET_TIMEOUT      500

Adafruit_BluefruitLE_SPI ble(BLUEFRUIT_SPI_CS, BLUEFRUIT_SPI_IRQ, BLUEFRUIT_SPI_RST); // Setup Bluefruit LE

void error(const __FlashStringHelper*err) { // Error Control
  Serial.println(err);
  while (1);
}

uint8_t readPacket(Adafruit_BLE *ble, uint16_t timeout); // function prototypes over in packetparser.cpp
float parsefloat(uint8_t *buffer);
void printHex(const uint8_t * data, const uint32_t numBytes);

extern uint8_t packetbuffer[]; // Declare variables
byte computerOS = 1;
bool commandError;
String osBuff;
String buttonBuff;

void setup() {

  Serial.begin(115200); // Setup Serial

  Serial.println(F("Starting HKR USB...")); // Startup
  Serial.println();

  Keyboard.begin(); // Start USB keyboard control
  
  Serial.print(F("Initialising the Bluefruit LE module... ")); // Initialise the Bluefruit LE module
  if ( !ble.begin(VERBOSE_MODE) )
  {
    error(F("Couldn't find Bluefruit, make sure it's in Command mode & check wiring"));
  }
  Serial.println(F("OK!"));
  Serial.println(); 
  
  if (FACTORYRESET_ENABLE)
  {
    Serial.println(F("Reseting Bluefruit LE module... ")); // Bluefruit LE reset
    if ( ! ble.factoryReset() ){
      error(F("Couldn't reset"));
    }
    Serial.println(F("OK!"));
    Serial.println();   
  } 
  
  ble.echo(false); // Connect Bluefruit LE
  ble.verbose(false); 
  while (! ble.isConnected()) {
    delay(500);
  } 
  
  if ( ble.isVersionAtLeast(MINIMUM_FIRMWARE_VERSION)) // Setup Bluefruit LE Module status lights 
  {
    ble.sendCommandCheckOK("AT+HWModeLED=" MODE_LED_BEHAVIOUR);
  } 
  ble.setMode(BLUEFRUIT_MODE_DATA);  
}

void loop() {
  uint8_t len = readPacket(&ble, BLE_READPACKET_TIMEOUT); // Check for new commands
  if (len == 0) return;

  if (packetbuffer[1] == 'B') { //  Check to see what command was sent
    uint8_t buttnum = packetbuffer[2] - '0';
    boolean pressed = packetbuffer[3] - '0';
    if (pressed) {
      sendCommand(buttnum);
    } 
}
}

void sendCommand(uint8_t button) { // Read Bluefruit LE data and send command over USB
  if (button > 4) { 
    computerOS = button - 4; 
  } else {
    commandError = false;
    if (button == 1) {
      if (computerOS == 1) {
        Keyboard.press(KEY_LEFT_ALT);
        Keyboard.press(KEY_LEFT_SHIFT);
        Keyboard.press(42);
      } else if (computerOS == 2) {
        commandError = true;
      } else if (computerOS == 3) {
        Keyboard.press(KEY_LEFT_CTRL);        
        Keyboard.press(KEY_CAPS_LOCK);  
        Keyboard.press('h');               
      } else {
        commandError = true;
      }      
    } else if (button == 2) {
      if (computerOS == 1) {
        Keyboard.press(KEY_LEFT_ALT);
        Keyboard.press(KEY_LEFT_CTRL);
        Keyboard.press(38);
      } else if (computerOS == 2) {
        commandError = true;
      } else if (computerOS == 3) {
        Keyboard.press(KEY_LEFT_CTRL);  
        Keyboard.press(KEY_LEFT_SHIFT);  
        Keyboard.press(KEY_F4);      
      } else {
        commandError = true;
      }
    } else if (button == 3) {
      if (computerOS == 1) {
        Keyboard.press(KEY_LEFT_ALT);
        Keyboard.press(KEY_F4);
      } else if (computerOS == 2) {
        //Keyboard.press(KEY_COMMAND);
        Keyboard.press('w');
        //Keyboard.press(KEY_LEFT_OPTION);        
      } else if (computerOS == 3) {
        Keyboard.press(KEY_LEFT_CTRL);  
        Keyboard.press(KEY_LEFT_SHIFT);
        Keyboard.press('w');        
      } else {
        Keyboard.press(KEY_LEFT_CTRL); 
        Keyboard.press('w');                
      }
    } else if (button == 4) {
      if (computerOS == 1) {
        Keyboard.press(KEY_LEFT_ALT);
        Keyboard.press(KEY_F4);
        delay(100);
        Keyboard.releaseAll();
        Keyboard.press(KEY_LEFT_ALT);
        Keyboard.press(KEY_F4);   
        Keyboard.press(KEY_RETURN);        
      } else if (computerOS == 2) {
        commandError = true;
      } else if (computerOS == 3) {
        Keyboard.press(KEY_LEFT_CTRL);  
        Keyboard.press(KEY_LEFT_SHIFT);
        Keyboard.press('q');
        Keyboard.release('q');
        delay(100);
        Keyboard.press('q');                              
      } else {
        commandError = true;
      }
    }
    delay(100);
    Keyboard.releaseAll();

    if (computerOS == 1) {
      osBuff = "Windows";
    } else if (computerOS == 2) {
      osBuff = "Mac OS";
    } else if (computerOS == 3) {
      osBuff = "Chrome OS";
    } else if (computerOS == 4) {
      osBuff = "Linux";
    }

    if (button == 1) {
      buttonBuff = "toggle high contrast mode";
    } else if (button == 2) {
      buttonBuff = "rotate screen";
    } else if (button == 3) {
      buttonBuff = "close program";
    } else if (button == 4) {
      buttonBuff = "logoff";
    }  

    if (commandError = false) {
      Serial.println(String("Sent ") + buttonBuff + String(" for  ") + osBuff + String(" to connected computer"));  
    } else {
      Serial.println(String("Error:  ") + buttonBuff + String(" keyboard shortcut does not exist for  ") + osBuff);
    }
  }
}

It looks like you've provided a prototype for a function named 'readPacket'. However, the linker can't find its definition. Where do you think it's defined?

is your packetParser.cpp file in the same folder as your sketch?

Thank you! I forgot to include the parser!