We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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.
Andrew, thank you very much, encapsulating my header file in extern "C" {//} solved my issue.