Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
6 years, 2 months ago.
New c files ignored until there are renamed with cpp as extension
Sometimes i add manually c source files to my project. If i compile, functions still undefined for the rest of my project. If I rename theses new files with cpp as extension it works...
6 years, 1 month ago.
How are you declaring the functions in the C files?
The reason being that C++ converts the names into decorated names which include the parameters to allow for over loading where as C doesn't. This means you have marked the declarations of the names in the C files as extern "C" which stops this name conversion happening and means that you can link with C code.