Dev-C++ likes to compile .c files as C++. You need to go into project options and untick the item about compiling with C++.