Associate II
February 10, 2020
Solved
Makefile Linking .o files
- February 10, 2020
- 2 replies
- 1606 views
I'm trying to use a function from a .c file (that I am trying to add to my project) in another .cpp file (touchGFX project screen.cpp), I included the header file, but I get an "undefined reference" error. I have figured out that this is a linking error, but I don't know how to link the .o files in the Makefile.
I thought maybe putting the .c file into the same directory as the .cpp file would link them during the compilation process, but all it does is put the .o files into the same directory without linking them.
I'm not too familiar with Makefile syntax, especially not how advanced it is in the ToughGFX Makefile, so it's hard for me to discern what is actually going on. Any advice?
