I would like to add simple own library to project include path. Project structure (I created folder delay)
-project
-Includes
-src
-Debug
-delay
-inc
-delay.h
-src
-delay.c
In project.c I added #include "inc/delay.h"
I added new include path in MCU C Compiler -> Includes -> Include path like this: "${workspace_loc:/project/delay}". When I try to Build it I get error:
/home/user/LPCXpresso/workspace/project/Debug/../src/project.c:41: undefined reference to `Delay_Init'
/home/user/LPCXpresso/workspace/project/Debug/../src/project.c:47: undefined reference to `Delay'
Delay_Init and Delay was created in delay.h and delay.c
For including a header to a file,
Go to: Project -> Properties ---> Select "Project Reference under the left tab", select the board and chip header files.
Hi Mateusz,
Con Verse's reply is correct, your head file in under delay/inc, so you still need to add /inc.
Please add it and try again.
Wish it helps you!
If you still have question, please let me know!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Specify the directories where the include files are. So if it is in delay/inc, the add delay/inc, not just delay as you have done.