Compile C files not as C++ code ?

24 Nov 2010

Is there a way in the online compiler, to let him compile C code (.c-files) a C code and not as C++ code. Usually this is ok, but at the moment I have a large library that needs a lot of changes before it is C++ compatible.

Thanks in advance.

Andreas

25 Nov 2010

Hi Andreas,

Everything is complied as C++. This actually helps a lot of people side-step what would otherwise be complex/confusing C-C++ linking problems. However, I will be looking at whether we can add C support to help with this sort of integration.

At the moment, the recommendation is to port code to be compatible with a C++ compiler.

Simon

28 Nov 2010

Simon, I finally managed to compile the code in C++ mode. However a mixed environment is standard since years. Thats what extern "C" is for. Serious, the underlying compiler supports this (I also use the offline version) and the mbed platform would benefit from porting a lot of libraries around. I already ported a MP3-lib (libmad) and a TIFF-lib (libtiff).

Anyway thanks for clearing things. Andreas