Hello,
I am writing a code which parts will be reused in other projects.
The question is: what is a good practice for code sharing (like libraries -> c+h files)?
I develop now a library which I'd like to include in other project. If new stable version is available I need to recompile other project to see the changes.
Shall I use some separate folder and just change a paths in #includes, or there is some other way?
thanks for your comments!
Solved! Go to Solution.
you can use link source file to share file for several project, see attached video
Have a great day,
Zhang Jun
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello,
what is the proper way of including such files into project code?
I've tried #include "source_folder/header_file.h" but KDS says: Unresolved inclusion + No such file or directory.
If I try only #include "header_file.h" I can access it when use Open Declaration but during building KDS says: No such file or directory.
Best regards.
Make sure your folders with the header files are listed in the Includes settings of the project:
If using C++, make sure you add them as well under the C++ compiler.
You can copy/paste items in Eclipse, see Adding Multiple Include Paths to Build Settings in Eclipse | MCU on Eclipse
I hope this helps,
Erich
you can use link source file to share file for several project, see attached video
Have a great day,
Zhang Jun
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------