|
|||||||||||
Technical Support Support Resources
Product Information |
GCC: Error (Undefined Reference to ...)Information in this article applies to:
QUESTIONI 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? ANSWERThe 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: Tuesday, February 23, 2021 | ||||||||||
|
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.