Error with Bosch Library and Environment Sensor

I am trying to get the bosch library to work on my rak 4631 with my environment sensor so I can get aqi readings instead of hms. I installed the bsec library, but am getting this error when I try to compile
Here is the traceback

Library BSEC_Software_Library has been declared precompiled:
Precompiled library in "/Users/A1/Documents/Arduino/libraries/BSEC_Software_Library/src/cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard/fpv4-sp-d16-hard" not found
Precompiled library in "/Users/A1/Documents/Arduino/libraries/BSEC_Software_Library/src/cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard" not found
/Users/A1/Library/Arduino15/packages/rakwireless/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: libraries/BSEC_Software_Library/BSEC_Software_Library.a(bsec.cpp.o): in function `Bsec::beginCommon()':
/Users/A1/Documents/Arduino/libraries/BSEC_Software_Library/src/bsec.cpp:157: undefined reference to `bsec_init'
/Users/A1/Library/Arduino15/packages/rakwireless/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: libraries/BSEC_Software_Library/BSEC_Software_Library.a(bsec.cpp.o): in function `Bsec::getVersion()':
/Users/A1/Documents/Arduino/libraries/BSEC_Software_Library/src/bsec.cpp:317: undefined reference to `bsec_get_version'
/Users/A1/Library/Arduino15/packages/rakwireless/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: libraries/BSEC_Software_Library/BSEC_Software_Library.a(bsec.cpp.o): in function `Bsec::updateSubscription(bsec_virtual_sensor_t*, unsigned char, float)':
/Users/A1/Documents/Arduino/libraries/BSEC_Software_Library/src/bsec.cpp:180: undefined reference to `bsec_update_subscription'
/Users/A1/Library/Arduino15/packages/rakwireless/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: libraries/BSEC_Software_Library/BSEC_Software_Library.a(bsec.cpp.o): in function `Bsec::setState(unsigned char*)':
/Users/A1/Documents/Arduino/libraries/BSEC_Software_Library/src/bsec.cpp:286: undefined reference to `bsec_set_state'
/Users/A1/Library/Arduino15/packages/rakwireless/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: libraries/BSEC_Software_Library/BSEC_Software_Library.a(bsec.cpp.o): in function `Bsec::readProcessData(long long, bsec_bme_settings_t)':
/Users/A1/Documents/Arduino/libraries/BSEC_Software_Library/src/bsec.cpp:385: undefined reference to `bsec_do_steps'
/Users/A1/Library/Arduino15/packages/rakwireless/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: libraries/BSEC_Software_Library/BSEC_Software_Library.a(bsec.cpp.o): in function `Bsec::run(long long)':
/Users/A1/Documents/Arduino/libraries/BSEC_Software_Library/src/bsec.cpp:202: undefined reference to `bsec_init'
/Users/A1/Library/Arduino15/packages/rakwireless/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /Users/A1/Documents/Arduino/libraries/BSEC_Software_Library/src/bsec.cpp:210: undefined reference to `bsec_update_subscription'
/Users/A1/Library/Arduino15/packages/rakwireless/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /Users/A1/Documents/Arduino/libraries/BSEC_Software_Library/src/bsec.cpp:216: undefined reference to `bsec_sensor_control'
/Users/A1/Library/Arduino15/packages/rakwireless/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /Users/A1/Documents/Arduino/libraries/BSEC_Software_Library/src/bsec.cpp:246: undefined reference to `bsec_get_state'
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board WisBlock Core RAK4631 Board.

Here is the code

#include "bsec.h"

// Helper functions declarations
void checkIaqSensorStatus(void);
void errLeds(void);

// Create an object of the class Bsec
Bsec iaqSensor;

String output;

// Entry point for the example
void setup(void)
{
  Serial.begin(115200);
  Wire.begin();

  iaqSensor.begin(BME680_I2C_ADDR_PRIMARY, Wire);
  output = "\nBSEC library version " + String(iaqSensor.version.major) + "." + String(iaqSensor.version.minor) + "." + String(iaqSensor.version.major_bugfix) + "." + String(iaqSensor.version.minor_bugfix);
  Serial.println(output);
  checkIaqSensorStatus();

  bsec_virtual_sensor_t sensorList[10] = {
    BSEC_OUTPUT_RAW_TEMPERATURE,
    BSEC_OUTPUT_RAW_PRESSURE,
    BSEC_OUTPUT_RAW_HUMIDITY,
    BSEC_OUTPUT_RAW_GAS,
    BSEC_OUTPUT_IAQ,
    BSEC_OUTPUT_STATIC_IAQ,
    BSEC_OUTPUT_CO2_EQUIVALENT,
    BSEC_OUTPUT_BREATH_VOC_EQUIVALENT,
    BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_TEMPERATURE,
    BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_HUMIDITY,
  };

  iaqSensor.updateSubscription(sensorList, 10, BSEC_SAMPLE_RATE_LP);
  checkIaqSensorStatus();

  // Print the header
  output = "Timestamp [ms], raw temperature [°C], pressure [hPa], raw relative humidity [%], gas [Ohm], IAQ, IAQ accuracy, temperature [°C], relative humidity [%], Static IAQ, CO2 equivalent, breath VOC equivalent";
  Serial.println(output);
}

// Function that is looped forever
void loop(void)
{
  unsigned long time_trigger = millis();
  if (iaqSensor.run()) { // If new data is available
    output = String(time_trigger);
    output += ", " + String(iaqSensor.rawTemperature);
    output += ", " + String(iaqSensor.pressure);
    output += ", " + String(iaqSensor.rawHumidity);
    output += ", " + String(iaqSensor.gasResistance);
    output += ", " + String(iaqSensor.iaq);
    output += ", " + String(iaqSensor.iaqAccuracy);
    output += ", " + String(iaqSensor.temperature);
    output += ", " + String(iaqSensor.humidity);
    output += ", " + String(iaqSensor.staticIaq);
    output += ", " + String(iaqSensor.co2Equivalent);
    output += ", " + String(iaqSensor.breathVocEquivalent);
    Serial.println(output);
  } else {
    checkIaqSensorStatus();
  }
}

// Helper function definitions
void checkIaqSensorStatus(void)
{
  if (iaqSensor.status != BSEC_OK) {
    if (iaqSensor.status < BSEC_OK) {
      output = "BSEC error code : " + String(iaqSensor.status);
      Serial.println(output);
      for (;;)
        errLeds(); /* Halt in case of failure */
    } else {
      output = "BSEC warning code : " + String(iaqSensor.status);
      Serial.println(output);
    }
  }

  if (iaqSensor.bme680Status != BME680_OK) {
    if (iaqSensor.bme680Status < BME680_OK) {
      output = "BME680 error code : " + String(iaqSensor.bme680Status);
      Serial.println(output);
      for (;;)
        errLeds(); /* Halt in case of failure */
    } else {
      output = "BME680 warning code : " + String(iaqSensor.bme680Status);
      Serial.println(output);
    }
  }
}

void errLeds(void)
{
  pinMode(LED_BUILTIN, OUTPUT);
  digitalWrite(LED_BUILTIN, HIGH);
  delay(100);
  digitalWrite(LED_BUILTIN, LOW);
  delay(100);
}

The Bosch BSEC is a closed source library that includes pre-compiled files into the application during compilation.
It requires changes in the BSP compiler options that are available in the latest version of the RAK-nRF52-Arduino BSP.

Update your BSP to version 1.0.1 and it should compile.

Ok that fixed it. Someone told me I could use that for AQI but I am only seeing IAQ in here? The IAQ is reading things such as 64602.00. I was hoping to see a number that I can use as a percentage to represent the current air quality to people.
Also I noticed that pressure on your company’s code reads 948 where as the data here reads 25.27

23:14:37.700 -> 2265017, 25.27, 101139.00, 44.35, 66810.00, 248.02, 1, 25.21, 44.49, 122.42, 1224.20, 2.18
23:14:40.712 -> 2268017, 25.27, 101138.00, 44.34, 66863.00, 248.64, 1, 25.21, 44.49, 122.69, 1226.90, 2.19
23:14:43.725 -> 2271016, 25.27, 101138.00, 44.36, 66810.00, 249.33, 1, 25.21, 44.51, 122.99, 1229.94, 2.20
23:14:46.704 -> 2274017, 25.27, 101138.00, 44.33, 67076.00, 248.39, 1, 25.21, 44.49, 122.58, 1225.85, 2.19
23:14:49.716 -> 2277017, 25.28, 101139.00, 44.32, 66810.00, 249.16, 1, 25.22, 44.46, 122.92, 1229.21, 2.20
23:14:52.728 -> 2280017, 25.27, 101139.00, 44.36, 66969.00, 248.82, 1, 25.21, 44.52, 122.77, 1227.73, 2.19

    BSEC_OUTPUT_RAW_TEMPERATURE,
    BSEC_OUTPUT_RAW_PRESSURE,
    BSEC_OUTPUT_RAW_HUMIDITY,
    BSEC_OUTPUT_RAW_GAS,
    BSEC_OUTPUT_IAQ,
    BSEC_OUTPUT_STATIC_IAQ,
    BSEC_OUTPUT_CO2_EQUIVALENT,
    BSEC_OUTPUT_BREATH_VOC_EQUIVALENT,
    BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_TEMPERATURE,
    BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_HUMIDITY,
  };

AQI = Air Quality Index
IAQ = Indoor Air Quality

You can google the difference.

And as you are using the Bosch Example, your questions should be asked in the BSEC-Arduino-library and not here.