FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\31f4403e35\opt\bin\cmake.EXE' --build 'c:\Nordic\LE_CENTRAL\build'

Hello, I was trying to code a new function into my project but I got a fatal error when  trying to build/flash. 

This is the part I was attempting to code and add RSSI. 

#include <zephyr/types.h>
#include <stddef.h>
#include <errno.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/byteorder.h>
#include <sdc_hci_cmd_status_params.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/uuid.h>
#include <zephyr/bluetooth/gatt.h>
#include <bluetooth/gatt_dm.h>
#include <bluetooth/scan.h>
#include <bluetooth/services/hrs_client.h>

static struct bt_conn *default_conn;

static struct bt_hrs_client hrs_c;
uint8_t sdc_hci_cmd_sp_read_rssi(const sdc_hci_cmd_sp_read_rssi_t *p_params, sdc_hci_cmd_sp_read_rssi_return_t *p_return);
int result = sdc_hci_cmd_sp_read_rssi;
static void notify_func(struct bt_hrs_client *hrs_c,
            const struct bt_hrs_client_measurement *meas,
            int err)
{
    if (err) {
        printk("Error during receiving Heart Rate Measurement notification, err: %d\n",
               err);
        return;
    }

    printk("Heart Rate Measurement notification received:\n\n");
    printk("\tHeart Rate Measurement Value Format: %s\n",
        meas->flags.value_format ? "16 - bit" : "8 - bit");
    printk("\tSensor Contact detected: %d\n", meas->flags.sensor_contact_detected);
    printk("\tSensor Contact supported: %d\n", meas->flags.sensor_contact_supported);
    printk("\tEnergy Expended present: %d\n", meas->flags.energy_expended_present);
    printk("\tRR-Intervals present: %d\n", meas->flags.rr_intervals_present);
    printk("\tRSSI: %d\n", result);
    printk("\n\tHeart Rate Measurement Value: %d bpm\n", meas->hr_value);

    if (meas->flags.energy_expended_present) {
        printk("\n\tEnergy Expended: %d J\n", meas->energy_expended);
    }

    if (meas->flags.rr_intervals_present) {
        printk("\t RR-intervals: ");
        for (size_t i = 0; i < meas->rr_intervals_count; i++) {
            printk("%d ", meas->rr_intervals[i]);
        }
    }

    printk("\n");
}
And then this is the error message I obtained. 
Building LE_CENTRAL
C:\WINDOWS\system32\cmd.exe /d /s /c "west build --build-dir c:/Nordic/LE_CENTRAL/build c:/Nordic/LE_CENTRAL"

[0/14] Performing build step for 'hci_rpmsg_subimage'
ninja: no work to do.
[2/12] Linking C executable zephyr\zephyr_pre0.elf
FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map
cmd.exe /C "cd . && C:\ncs\toolchains\31f4403e35\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -gdwarf-4 zephyr/CMakeFiles/zephyr_pre0.dir/misc/empty_file.c.obj -o zephyr\zephyr_pre0.elf -fuse-ld=bfd -T zephyr/linker_zephyr_pre0.cmd -Wl,-Map=C:/Nordic/LE_CENTRAL/build/zephyr/zephyr_pre0.map -Wl,--whole-archive app/libapp.a zephyr/libzephyr.a zephyr/arch/common/libarch__common.a zephyr/arch/arch/arm/core/aarch32/libarch__arm__core__aarch32.a zephyr/arch/arch/arm/core/aarch32/cortex_m/libarch__arm__core__aarch32__cortex_m.a zephyr/arch/arch/arm/core/aarch32/cortex_m/cmse/libarch__arm__core__aarch32__cortex_m__cmse.a zephyr/arch/arch/arm/core/aarch32/mpu/libarch__arm__core__aarch32__mpu.a zephyr/lib/libc/minimal/liblib__libc__minimal.a zephyr/soc/arm/common/cortex_m/libsoc__arm__common__cortex_m.a zephyr/boards/arm/nrf5340dk_nrf5340/libboards__arm__nrf5340dk_nrf5340.a zephyr/subsys/bluetooth/common/libsubsys__bluetooth__common.a zephyr/subsys/bluetooth/host/libsubsys__bluetooth__host.a zephyr/subsys/net/libsubsys__net.a zephyr/drivers/bluetooth/libdrivers__bluetooth.a zephyr/drivers/clock_control/libdrivers__clock_control.a zephyr/drivers/console/libdrivers__console.a zephyr/drivers/gpio/libdrivers__gpio.a zephyr/drivers/mbox/libdrivers__mbox.a zephyr/drivers/pinctrl/libdrivers__pinctrl.a zephyr/drivers/serial/libdrivers__serial.a zephyr/drivers/timer/libdrivers__timer.a modules/nrf/lib/fatal_error/lib..__nrf__lib__fatal_error.a modules/nrf/drivers/hw_cc310/lib..__nrf__drivers__hw_cc310.a modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a modules/libmetal/libmetal/lib/libmetal.a modules/open-amp/open-amp/lib/libopen_amp.a -Wl,--no-whole-archive zephyr/kernel/libkernel.a zephyr/CMakeFiles/offsets.dir/./arch/arm/core/offsets/offsets.c.obj -L"c:/ncs/toolchains/31f4403e35/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/thumb/v8-m.main/nofp" -LC:/Nordic/LE_CENTRAL/build/zephyr -lgcc zephyr/arch/common/libisr_tables.a -mcpu=cortex-m33 -mthumb -mabi=aapcs -Wl,--gc-sections -Wl,--build-id=none -Wl,--sort-common=descending -Wl,--sort-section=alignment -Wl,-u,_OffsetAbsSyms -Wl,-u,_ConfigAbsSyms -nostdlib -static -Wl,-X -Wl,-N -Wl,--orphan-handling=warn -Wl,-no-pie C:/ncs/v2.4.2/nrfxlib/crypto/nrf_cc312_platform/lib/cortex-m33/soft-float/no-interrupts/libnrf_cc312_platform_0.9.17.a && cmd.exe /C "cd /D C:\Nordic\LE_CENTRAL\build\zephyr && C:\ncs\toolchains\31f4403e35\opt\bin\cmake.exe -E echo ""
c:/ncs/toolchains/31f4403e35/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: app/libapp.a(main.c.obj):C:\Nordic\LE_CENTRAL\src\main.c:30: undefined reference to `sdc_hci_cmd_sp_read_rssi'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\31f4403e35\opt\bin\cmake.EXE' --build 'c:\Nordic\LE_CENTRAL\build'
It would be helpful to know how to get the error to be gone and how to properly implement the function. Thanks. 
Related