Error including nRF Cloud Libraries: undefined reference to `nrf_cloud_connect'

I'm using a custom device that is based on the nRF9160. I'd like to get it registered on nRF Cloud in order to make use of features such as AGPS, PGPS, Cell-Positioning and FOTA. 

An snippet of a part of my code below:


#include "cJSON.h"
#include "net/nrf_cloud.h"
#include "net/nrf_cloud_cell_pos.h"
#include "net/nrf_cloud_agps.h"
#include "net/nrf_cloud_pgps.h"

if (lte_connected){
	int err;	
	err = nrf_cloud_connect();
	if (err) {
		LOG_ERR("nrf_cloud_connect failed: %d", err);
	} else {
		LOG_INF("nRF Cloud successfully connected");
	}
}

When compiling I get the error: 

C:\XXX\src\main.c:1191: undefined reference to `nrf_cloud_connect'
collect2.exe: error: ld returned 1 exit status

Using VS Code with the nRF Connect plugin and SDK v2.1.0. Modem firmware updated to v1.3.4

Am I including the wrong libraries? Are there some compatibility issues I'm not aware of? Any assistance will be appreciated. Please point me in the right direction :) 

Parents Reply Children
No Data
Related