- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a trouble in adding existing header file and source file.
The directory structure is like following,
workspace folder/
project folder(.cydsn)/
main.c
UserCode/
header.h
source.c
I added include path "./UserCode", so, I could call constants declared in header.h from main.c.
But, when I call the function declared in header.h and defined in source.c from main.c,
PSoC Creator outputs error "undefined reference to the function".
When I create new header and source in PSoC Creator Workspace Explorer, and copy the contents from existing files, PSoC Creator outputs no error.
How to fix this error?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you please mention how are you adding your .h and .c files .Are you doing so by right clicking the Source files and Header files and then choosing the Add existing item option
PSoC Creator outputs error "undefined reference to the function" when the project doesn't includes files(either.c or .h) properly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you please mention how are you adding your .h and .c files .Are you doing so by right clicking the Source files and Header files and then choosing the Add existing item option
PSoC Creator outputs error "undefined reference to the function" when the project doesn't includes files(either.c or .h) properly.