error undefined reference
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-02 3:29 AM
Good morning when compiling a project to which I added files (.h and.cpp) returns the error of "undefined reference" on a function that is in these files. I also add that I added other files (always .c and.h) of which I called a function without having problems.
This discussion is locked. Please start a new topic to ask your question.
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-02 4:53 AM
Still a bit non-specific, what's the linker actually telling you, can you see the functions in the .MAP?
​
When mixing .C and .CPP​ files be aware of name mangling and linkage rules. Use use extern "C" or extern cdecl as appropriate.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-03 1:46 AM
thanks
