This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Issue with linker .c files vs .cpp

I have seen similar posts on the forums about "Undefined symbol" linker error, but I cannot seem to find a solution to this: I have the header file in the project so no compilation issues, and I have included the source driver .c file in /drivers. It compiles this file fine as well. The driver file does indeed provide function definitions within, but the linker has issue. I have had it in the /drivers directory, and just in the main directory of the project folder with no success.

However, when I change the driver .c file to a .cpp file this seems to resolve the issue. I can't seem to find any information on the linker having issue with linking .c files as I have never had that problem before. I am unsure if there is a flag that may be inadvertently set that restricts file types?

I appreciate any insights to this.