Keil Logo


Information in this article applies to:

  • GNU C Compiler for ARM All Versions


I have added my C source file, MYFILE.C, to my µVision project. When I compile and link the project, all external functions and variables of this module are reported as Error: undefined reference to .... I am sure that these functions and variables are defined in the other modules. What is the reason for this error?


The GNU tools are case sensitive. The file extension '.C' (uppercase C) is considered to be a C++ module, not a C module. The function and variable names are not compatible across C and C++ modules unless they are defined as extern "C".

Change the file extension to '.c' (lowercase c) and add this file to your project again. The filename may contain lowercase and uppercase characters.

Last Reviewed: Monday, July 10, 2006

Did this article provide the answer you needed?
Not Sure
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.