Undefined reference cellular_credentials_set

I created a new project with the following code:

#include "cellular_hal.h"
STARTUP(cellular_credentials_set("broadband", "", "", NULL));

void setup() {

void loop() {

And i get the following error on compile: undefined reference to `cellular_credentials_set’
Looks like some bug in the IDE?

Hi @lympik

I would double check that you are targeting an Electron. That function does not exist for a Photon.

@bko Thanks for your help! I cannot find anywhere settings to compile it for electron? Where can i find them? (I have no devices setup currently)

If you are using Web IDE, open the Devices drawer (fourth from the top - cross hair target) and select your Electron device by clicking the star to the left of the device name.
Without a device you won’t be able to build for anything else but a Spark Core in Web IDE.

CLI & Desktop IDE offer a way to target without device.

1 Like

Perfect thanks!