C/Cpp clarification help

Hello all,

This might be a bad questions that has me confused a little.

I’ve been running the photon through the local compile using the DFU bootloader which by online instructions, asks for the files to have a .cpp extension. Then I was going though some of the firmware files which have a .c extension.

Does the Photon have a set language or does it simply depend on which libraries I’m using that determine which files are .c and which are .cpp? If so, how come the user application file that I write if I want to do a local compile needs the file to be .cpp ?

Hey @mdma, could you help out with this?

Hi @DB098, you can use either C or CPP files, depending upon if you want to compile C or C++ code. If you’re unsure, it’s best to stick with C++.

1 Like